diff --git a/compact_conditionals_cli_test.go b/compact_conditionals_cli_test.go new file mode 100644 index 00000000..59f7b3c5 --- /dev/null +++ b/compact_conditionals_cli_test.go @@ -0,0 +1,102 @@ +package main + +import ( + "encoding/json" + "os" + "os/exec" + "path/filepath" + "strings" + "testing" + + "github.com/howlcipher/howlframe/internal/bytecode" +) + +// Compact-conditional built-ins (ver_gt, ver_ge, all, any, inline list_get and +// parse_json operands) must be pure: a program using only them needs no +// capability, and they compute the documented results. +func TestCompactConditionalBuiltinsArePureAndCorrect(t *testing.T) { + bin := c1c2Binary(t) + dir := t.TempDir() + src := filepath.Join(dir, "p.howl") + art := filepath.Join(dir, "p.hfbc") + program := `(do + (let (xs (list 1 2 3) kv (str_split "current=1.9.9\nproposed=1.10.0" "\n")) + (do + (print (all x xs (> x 0)) (all x xs (> x 1)) (all x (list) (= x 9))) + (print (any x xs (= x 3)) (any x xs (= x 7)) (any x (list) (= x 9))) + (print (ver_gt "1.10.0" "1.9.9") (ver_gt "1.2.3" "1.2.3") (ver_ge "1.2.3" "1.2.3") (ver_gt "0.9.9" "1.0.0") (ver_ge "2.0.0" "10.0.0") (ver_gt "1.2.10" "1.2.9")) + (print (list_get (str_split "a.b.c" ".") 2) (ver_gt (list_get (str_split (list_get kv 1) "=") 1) (list_get (str_split (list_get kv 0) "=") 1))) + (print (all x xs (any y (list 3 2 1) (= x y)))))))` + if err := os.WriteFile(src, []byte(program), 0600); err != nil { + t.Fatal(err) + } + for _, profile := range []string{"default", "governed"} { + if out, err := exec.Command(bin, "check", "--profile", profile, src).CombinedOutput(); err != nil { + t.Fatalf("check %s: %v %s", profile, err, out) + } + } + if out, err := exec.Command(bin, "build", "--profile", "governed", src, "-o", art).CombinedOutput(); err != nil { + t.Fatalf("build: %v %s", err, out) + } + out, err := exec.Command(bin, "inspect", "--caps", art).CombinedOutput() + if err != nil { + t.Fatalf("inspect: %v %s", err, out) + } + var report bytecode.Report + if err := json.Unmarshal(out, &report); err != nil { + t.Fatalf("%v: %s", err, out) + } + if len(report.Capabilities) != 0 { + t.Fatalf("pure built-ins required capabilities %v", report.Capabilities) + } + run, err := exec.Command(bin, src).CombinedOutput() + if err != nil { + t.Fatalf("run: %v %s", err, run) + } + want := "true false true\ntrue false false\ntrue false true false false true\nc true\ntrue\n" + if string(run) != want { + t.Fatalf("got %q want %q", run, want) + } +} + +// Inline parse_json operands are accepted by the governed profile, but the +// operand is still scanned before anything is built or executed. A forbidden +// construct hidden in the operand must fail closed: diagnostic, no artifact, +// and no earlier effect in the same program runs. +func TestGovernedInlineParseJSONFailsClosed(t *testing.T) { + bin := c1c2Binary(t) + dir := t.TempDir() + side := filepath.Join(dir, "side") + src := filepath.Join(dir, "x.howl") + art := filepath.Join(dir, "x.hfbc") + forms := map[string]string{ + "exec": `(exec "touch" "` + side + `.exec")`, + "llm_generate": `(llm_generate "x")`, + "spawn": `(spawn (lambda () (print "x")))`, + } + for name, operand := range forms { + t.Run(name, func(t *testing.T) { + program := `(do (write_file "` + side + `" "ran") (let (d (parse_json Any ` + operand + `)) (print d)))` + os.WriteFile(src, []byte(program), 0600) + for _, args := range [][]string{ + {"check", "--profile", "governed", src}, + {"build", "--profile", "governed", src, "-o", art}, + } { + out, err := exec.Command(bin, args...).CombinedOutput() + if err == nil || !strings.Contains(string(out), "PROFILE_FORBIDDEN_CONSTRUCT") || !strings.Contains(string(out), name) { + t.Fatalf("%v accepted or wrong diagnostic: %v %s", args, err, out) + } + for _, p := range []string{art, side, side + ".exec"} { + if _, err := os.Stat(p); !os.IsNotExist(err) { + t.Fatalf("%s exists after rejected %v", p, args) + } + } + } + }) + } + // The allowed shape still builds under governed. + os.WriteFile(src, []byte(`(do (let (d (parse_json Any (read_text "in.json"))) (print d)))`), 0600) + if out, err := exec.Command(bin, "build", "--profile", "governed", src, "-o", art).CombinedOutput(); err != nil { + t.Fatalf("inline parse_json rejected: %v %s", err, out) + } +} diff --git a/docs/journals/2026-10-12_compact_conditionals.md b/docs/journals/2026-10-12_compact_conditionals.md new file mode 100644 index 00000000..a02d975e --- /dev/null +++ b/docs/journals/2026-10-12_compact_conditionals.md @@ -0,0 +1,83 @@ +# Compact conditionals (2026-10-12) + +## Goal + +Close the conditional-task gap from #134. There, HowlFrame's mean on the 22 +conditional tasks was 344.55 tokens, against Python's 196.00. The language +additions had to stay pure, and the governed checks had to stay fail-closed. + +## What shipped + +All four are `ast.Desugar` sugar, expanding into constructs that already lower +(`internal/ast/desugar_compact.go`). No new opcode, capability or effect is added. + +- `(ver_gt a b)` and `(ver_ge a b)`: strict numeric x.y.z comparison. +- `(all x list pred)` and `(any x list pred)`. +- `list_get` accepts any expression as its list. Non-symbol operands are bound to a gensym. +- `(parse_json T )` binds its operand to a gensym. The governed + pre-desugar profile scan (`construct.scanSupported`) now descends into the + operand instead of rejecting the shape. The default construct scan stays strict. + +`all`, `any`, `ver_gt` and `ver_ge` are registered as `CompileTimeOnly`, in +sorted position, and are listed in the bytecode drift test as consumed before lowering. + +## Guards (Lain) + +- **Purity:** + - The unit test checks that expansions use only a closed set of pure heads. + - The CLI test builds a governed program that uses every form. `inspect --caps` + must report no capabilities, and running it must match the expected truth table. +- **Fail-closed ordering:** + - `exec`, `llm_generate` or `spawn` is hidden inside an inline `parse_json`, + preceded by `write_file`. + - Governed `check` and `build` must both fail with `PROFILE_FORBIDDEN_CONSTRUCT`. + - No artifact, side file or exec output may exist afterwards. + - The allowed shape still builds. + +## Motoko follow-up + +`experiments/token-efficiency-v0/verification_test.go` checks that +`results/verification.json` has 60 × 4 entries, all passing, each with a SHA-256 that matches the source. + +## PR-range correction + +#134 cited "#124–#130" and its brief cited "#128–#130". In fact, `git log -S` on +`internal/ast/desugar.go` shows the following sources: + +| Sugar used by the references | Introduced in | +|---|---| +| root `do` | #117 | +| `read_text`, `lines` | #118 | +| multi-binding `let` | #120 | +| `when` | #124 | + +No #128–#130 sugar is used. The report and the #134 journal are corrected. + +## Results (cl100k / o200k) + +| Measure | Before | After | +|---|---|---| +| HowlFrame median | 124 / 123 | **117 / 116** | +| vs Python (median per-task ratio) | 1.059 / 1.058 | **0.983 / 0.983** | +| vs JS | 1.019 / 0.953 | **0.959 / 0.896** | +| vs Go | 0.496 / 0.492 | **0.445 / 0.446** | +| Conditional-task mean | 344.55 | **186.00** (Python 196.00) | + +Python and JS medians are unchanged at 119 / 118 and 122 / 129. + +HowlFrame now uses no more tokens than Python on any task: it is smaller on 44 +and ties on the 16 write-record tasks. It is smaller than JS on all 60 tasks. + +## Caveats + +- The features were shaped by this corpus, so a held-out corpus is needed. +- `ver_*` errors at runtime on version strings with fewer than three parts. + It does not return false. +- The gensym counter makes desugared temporary names process-order dependent. + This does not affect semantics. + +## Next hot spots + +1. KV lookup for `current=`/`proposed=`: 35 tokens. +2. A pure `filter` to replace the for/when/append loop: about 27 tokens against Python's 17. +3. `dict` pair syntax and the escaped JSON literal for the blocked payload. diff --git a/docs/journals/2026-10-12_token_benchmark_rerun.md b/docs/journals/2026-10-12_token_benchmark_rerun.md index 280fd146..11d653d3 100644 --- a/docs/journals/2026-10-12_token_benchmark_rerun.md +++ b/docs/journals/2026-10-12_token_benchmark_rerun.md @@ -3,7 +3,7 @@ ## Goal Rerun `experiments/token-efficiency-v0` on main `fd1c6225` (includes the -#124–#130 density sugar). Re-author HowlFrame references in idiomatic current +#117–#130 density sugar; the references use root `do` #117, `read_text`/`lines` #118, multi-binding `let` #120 and `when` #124 — corrected 2026-10-12, previously misstated as #124–#130). Re-author HowlFrame references in idiomatic current syntax, leave Python/JS/Go untouched, and fix the #133 REPORT.md issues. ## What changed diff --git a/docs/reference/construct_coverage.md b/docs/reference/construct_coverage.md index fa6cd3f3..e5042870 100644 --- a/docs/reference/construct_coverage.md +++ b/docs/reference/construct_coverage.md @@ -16,7 +16,9 @@ | `>` | Yes | None | No | No | - | AUTHORITATIVE | | `>=` | Yes | None | No | No | - | AUTHORITATIVE | | `achieve` | Yes | network | No | No | - | AUTHORITATIVE | +| `all` | No | None | Yes | No | - | AUTHORITATIVE | | `and` | Yes | None | No | No | - | AUTHORITATIVE | +| `any` | No | None | Yes | No | - | AUTHORITATIVE | | `append` | Yes | None | No | No | - | AUTHORITATIVE | | `assert` | No | None | Yes | No | - | AUTHORITATIVE | | `assert_semantic` | No | None | No | Yes | - | AUTHORITATIVE | @@ -135,6 +137,8 @@ | `unix_now` | No | None | Yes | No | - | AUTHORITATIVE | | `unless` | No | None | Yes | No | - | AUTHORITATIVE | | `use` | No | None | Yes | No | - | AUTHORITATIVE | +| `ver_ge` | No | None | Yes | No | - | AUTHORITATIVE | +| `ver_gt` | No | None | Yes | No | - | AUTHORITATIVE | | `wasm_app` | Yes | None | No | No | - | AUTHORITATIVE | | `web_app` | Yes | None | No | No | - | AUTHORITATIVE | | `when` | No | None | Yes | No | - | AUTHORITATIVE | diff --git a/experiments/token-efficiency-v0/REPORT.md b/experiments/token-efficiency-v0/REPORT.md index ded6beb9..03318d78 100644 --- a/experiments/token-efficiency-v0/REPORT.md +++ b/experiments/token-efficiency-v0/REPORT.md @@ -1,35 +1,85 @@ -# Token-efficiency benchmark v0 — rerun on current shorthand (measure only) - -Rerun on main `fd1c6225` (2026-10-12), which includes the #124–#130 density -sugar. The 60 HowlFrame references were re-authored in current idiomatic -syntax; Python, JavaScript and Go references are **byte-identical** to the -`fd1c6225` baseline. Same tasks, same verifier, same `run.sh`/`count_tokens.py`, -same tokenizers (`tiktoken==0.8.0`, `cl100k_base`, `o200k_base`). - -Headline: HowlFrame's median fell **160 → 124** (`cl100k_base`) and -**159 → 123** (`o200k_base`). It is now within ~6% of Python and ~2% of -JavaScript on `cl100k_base`, and **beats JavaScript on `o200k_base`** -(median per-task ratio 0.953; fewer tokens on 38/60 tasks). It still uses more -tokens than Python on all 60 tasks, and more than JavaScript on all 22 -conditional (version-comparison) tasks under both encodings. - -This is a source-size measurement of authored, verified references. It measures -neither model success nor generation/repair cost. No live LLM/API calls were -made, no H1 PASS/KILL decision is claimed, and issue #90 remains Partial. No -language, compiler, checker, VM, HFIR default or production `-compile-bc` -behaviour changed. +# Token-efficiency benchmark v0 — compact conditionals (measure only) + +This is the third measurement of this corpus: + +- **#133 (`fd1c6225`):** the original references. Their HowlFrame side predates the density sugar. +- **#134 (`f930cf6e`):** HowlFrame re-authored with the sugar from #117–#130. + - The sugar it actually used: root `do` (#117), `read_text`/`lines` (#118), + multi-binding `let` (#120) and `when` (#124). + - Earlier text said "#124–#130" or "#128–#130"; both ranges were wrong, and #128–#130 sugar is not used here. +- **This slice:** compact-conditional built-ins, described below. + +Python, JavaScript and Go references are **byte-identical** across all three. +The tasks, verifier, `run.sh`/`count_tokens.py` and tokenizers +(`tiktoken==0.8.0`, `cl100k_base`, `o200k_base`) are unchanged. + +Headline: + +- **Medians:** HowlFrame 124/123 → **117/116** (`cl100k_base`/`o200k_base`), + against Python 119/118 and JavaScript 122/129. +- **Conditional tasks:** the mean fell from 344.55 to **186.00**, against Python's 196.00. +- **Per task:** HowlFrame uses fewer tokens than Python on 44 tasks and ties on 16 + (the write-record tasks), on both encodings. It uses fewer than JavaScript on all 60. + +This is a source-size measurement of authored, verified references. It +measures neither model success nor generation/repair cost. No live LLM/API +calls were made, no H1 PASS/KILL decision is claimed, and issue #90 remains +Partial. Production `-compile-bc`/HFIR defaults are unchanged. + +## Language changes in this slice + +The four additions all expand in `ast.Desugar` into constructs that already +lower (`let`, `for`, `if`, `set`, `str_split`, `to_int`, `list_get`, +comparisons). They add no opcode, capability or effect. + +1. **`(ver_gt a b)` / `(ver_ge a b)`:** strict numeric x.y.z comparison of two + version strings, lexicographic over major/minor/patch (`1.10.0 > 1.9.9`). + The inputs must have three numeric parts. Fewer parts fail at runtime on + `list_get`; they are not accepted silently. +2. **`(all x list pred)` / `(any x list pred)`:** bind each element to `x` + and test `pred`. `all` over an empty list is true; `any` is false. +3. **`list_get` with any expression operand.** A non-symbol list is bound to a + fresh temporary first, because lowering reads a variable name. +4. **Inline `parse_json` under governed.** `(parse_json T )` binds the + operand to a temporary in desugar. + - The governed profile scan runs **before** desugar. It now descends into + the operand instead of rejecting the shape outright. + - Forbidden constructs inside the operand are still rejected, and the + post-desugar scans and the construct gate run unchanged. + - The default `construct.Scan` stays strict for undesugared trees. + +Guards (tests): + +- **Purity, unit test:** `internal/ast/desugar_compact_test.go` checks that every + expansion uses only a closed set of pure heads, and that no sugar head survives desugar. +- **Purity, end to end:** `TestCompactConditionalBuiltinsArePureAndCorrect` + builds a program under governed that uses every new form, then checks two things: + - `inspect --caps` reports **no** capabilities; + - running it gives the expected truth table, including empty lists, + equal versions, `1.10.0` vs `1.9.9`, `10.0.0`, nesting, and inline `list_get`. +- **Fail-closed ordering:** `TestGovernedInlineParseJSONFailsClosed` + hides `exec`, `llm_generate` or `spawn` inside an inline `parse_json` operand, + preceded by a `write_file` side effect. + - Governed `check` and `build` must both fail with + `PROFILE_FORBIDDEN_CONSTRUCT` naming the construct. + - No artifact, side file or exec output may exist afterwards. + - The allowed shape (`read_text` operand) still builds. +- **Registry and drift:** `all`, `any`, `ver_gt` and `ver_ge` are registered as + `CompileTimeOnly` and listed as consumed before lowering. +- **Results integrity:** `verification_test.go` checks that `results/verification.json` + covers 60 × 4 entries, all passing, each with a matching SHA-256. ## Before vs after -Raw source tokens (before = merged #133 baseline on `fd1c6225` sources; after = this rerun): +Before is #134 on `f930cf6e`; after is this branch. Raw source tokens: | Encoding | Language | Median before | Median after | Mean before | Mean after | | --- | --- | ---: | ---: | ---: | ---: | -| cl100k_base | HowlFrame | 160 | **124** | 248.83 | **200.60** | +| cl100k_base | HowlFrame | 124 | **117** | 200.60 | **138.30** | | cl100k_base | Python | 119 | 119 | 142.70 | 142.70 | | cl100k_base | JavaScript | 122 | 122 | 163.20 | 163.20 | | cl100k_base | Go | 250 | 250 | 328.00 | 328.00 | -| o200k_base | HowlFrame | 159 | **123** | 248.73 | **200.50** | +| o200k_base | HowlFrame | 123 | **116** | 200.50 | **138.20** | | o200k_base | Python | 118 | 118 | 142.60 | 142.60 | | o200k_base | JavaScript | 129 | 129 | 171.10 | 171.10 | | o200k_base | Go | 250 | 250 | 328.90 | 328.90 | @@ -38,135 +88,117 @@ HowlFrame / comparison ratios (>1 means HowlFrame uses more tokens): | Encoding | vs | Median per-task ratio before → after | Ratio of medians before → after | Tasks HowlFrame larger before → after | | --- | --- | ---: | ---: | ---: | -| cl100k_base | Python | 1.422 → **1.059** | 1.345 → 1.042 | 60 → 60 | -| cl100k_base | JavaScript | 1.368 → **1.019** | 1.311 → 1.016 | 60 → 60 | -| cl100k_base | Go | 0.640 → **0.496** | 0.640 → 0.496 | 0 → 0 | -| o200k_base | Python | 1.417 → **1.058** | 1.347 → 1.042 | 60 → 60 | -| o200k_base | JavaScript | 1.270 → **0.953** | 1.233 → 0.953 | 60 → **22** | -| o200k_base | Go | 0.636 → **0.492** | 0.636 → 0.492 | 0 → 0 | +| cl100k_base | Python | 1.059 → **0.983** | 1.042 → 0.983 | 60 → **0** (16 ties) | +| cl100k_base | JavaScript | 1.019 → **0.959** | 1.016 → 0.959 | 60 → **0** | +| cl100k_base | Go | 0.496 → **0.445** | 0.496 → 0.468 | 0 → 0 | +| o200k_base | Python | 1.058 → **0.983** | 1.042 → 0.983 | 60 → **0** (16 ties) | +| o200k_base | JavaScript | 0.953 → **0.896** | 0.953 → 0.899 | 22 → **0** | +| o200k_base | Go | 0.492 → **0.446** | 0.492 → 0.464 | 0 → 0 | -The 22 tasks still larger than JavaScript on `o200k_base` are exactly the -conditional tasks (`t02`, `t11`–`t20`, `a02`, `a11`–`a20`). No raw ties occur. +Cumulative from the #133 baseline: the HowlFrame median went 160/159 → 117/116. +The per-task ratio went 1.42x → 0.98x against Python and 1.37x/1.27x → 0.96x/0.90x against JavaScript. -Category means (identical across encodings for HowlFrame and Python except where shown cl100k/o200k): +Category means. HowlFrame and Python are identical across encodings unless shown as cl100k/o200k: -| Category | n | HowlFrame before | HowlFrame after | Python | JavaScript | Go | -| --- | ---: | ---: | ---: | ---: | ---: | ---: | -| conditional (release iff all PASS and newer version) | 22 | 413.18 | **344.55** | 196.00 | 246.00/254.00 | 478.00/479.00 | -| write record (non-conditional) | 16 | 145.00/146.00 | **108.00/109.00** | 102.00/103.00 | 106.00/115.00 | 229.00/231.00 | -| request approval | 22 | 160.00/159.00 | **124.00/123.00** | 119.00/118.00 | 122.00/129.00 | 250.00/250.00 | +| Category | n | HowlFrame #133 | HowlFrame #134 | HowlFrame now | Python | JavaScript | Go | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | +| conditional | 22 | 413.18 | 344.55 | **186.00** | 196.00 | 246.00/254.00 | 478.00/479.00 | +| write record | 16 | 145.00/146.00 | 108.00/109.00 | **102.00/103.00** | 102.00/103.00 | 106.00/115.00 | 229.00/231.00 | +| request approval | 22 | 160.00/159.00 | 124.00/123.00 | **117.00/116.00** | 119.00/118.00 | 122.00/129.00 | 250.00/250.00 | -Comment/blank-line stripping changes no HowlFrame, Python or JavaScript -count; Go drops 6 tokens per file (build tag), giving HowlFrame/Go -0.508 (`cl100k_base`) and 0.504 (`o200k_base`). +Changes per category: -## What changed in the HowlFrame references +- **Conditional tasks** dropped 134 tokens (loop variant) or 161 tokens (unit variant). + `all` replaced the second failure-collection loop and the list-length test, + and `ver_gt` with inline `list_get` replaced eight bindings and a nested comparison. +- **Write-record and approval tasks** saved 6–7 tokens each from the inline `parse_json`, which drops the `raw` binding and one `let`. -All 60 files are produced by `howl_src` in `author_solutions.py` and use: +Comment/blank-line stripping changes only Go, which drops 6 tokens per file +for the build tag. HowlFrame/Go then becomes 0.457/0.458 per task. -- `read_text` instead of `(bytes_to_string (read_file …))`; -- `lines` for the version KV file in conditional tasks; -- root `(do …)` instead of `cli_app`; -- multi-binding `let` instead of one nested `let` per binding; -- `when` for single-branch filters; -- `int` bindings (`c0…p2`) so the strict x.y.z comparison no longer repeats - `(to_int (list_get …))` for every comparison. - -Three constraints surfaced while authoring (both documented, neither changed): - -- Under the governed profile used by `hfexp arm-a`, - `(parse_json Checks (read_text …))` is rejected with - `PROFILE_FORBIDDEN_CONSTRUCT` (the profile scan runs before desugar), so the - JSON text still needs its own `raw` binding. -- `list_get` requires a symbol list operand, so the `=`-split and `.`-split - intermediates (`cp`, `pp`, `cur`, `pro`) must be bound. -- A multi-form `let` body still needs an explicit `(do …)`. - - -## Per-task delta (HowlFrame raw tokens, cl100k_base/o200k_base) +## Per-task delta (HowlFrame raw tokens, #134 → now, cl100k_base/o200k_base) | Task | Category | HF before cl/o | HF after cl/o | Δ cl/o | Python cl/o | JS cl/o | |---|---|---:|---:|---:|---:|---:| -| t01 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| t02 | conditional | 385/385 | 320/320 | -65/-65 | 196/196 | 246/254 | -| t03 | approval | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| t04 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| t05 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| t06 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| t07 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| t08 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| t09 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| t10 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| t11 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| t12 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| t13 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| t14 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| t15 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| t16 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| t17 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| t18 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| t19 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| t20 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| t21 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| t22 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| t23 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| t24 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| t25 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| t26 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| t27 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| t28 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| t29 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| t30 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| a01 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| a02 | conditional | 385/385 | 320/320 | -65/-65 | 196/196 | 246/254 | -| a03 | approval | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| a04 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| a05 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| a06 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| a07 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| a08 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| a09 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| a10 | write | 145/146 | 108/109 | -37/-37 | 102/103 | 106/115 | -| a11 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| a12 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| a13 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| a14 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| a15 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| a16 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| a17 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| a18 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| a19 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| a20 | conditional (unit) | 416/416 | 347/347 | -69/-69 | 196/196 | 246/254 | -| a21 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| a22 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| a23 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| a24 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| a25 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| a26 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| a27 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| a28 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| a29 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | -| a30 | approval (unit) | 160/159 | 124/123 | -36/-36 | 119/118 | 122/129 | +| t01 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| t02 | conditional | 320/320 | 186/186 | -134/-134 | 196/196 | 246/254 | +| t03 | approval | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| t04 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| t05 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| t06 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| t07 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| t08 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| t09 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| t10 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| t11 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| t12 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| t13 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| t14 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| t15 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| t16 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| t17 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| t18 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| t19 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| t20 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| t21 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| t22 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| t23 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| t24 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| t25 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| t26 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| t27 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| t28 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| t29 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| t30 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| a01 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| a02 | conditional | 320/320 | 186/186 | -134/-134 | 196/196 | 246/254 | +| a03 | approval | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| a04 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| a05 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| a06 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| a07 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| a08 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| a09 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| a10 | write | 108/109 | 102/103 | -6/-6 | 102/103 | 106/115 | +| a11 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| a12 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| a13 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| a14 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| a15 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| a16 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| a17 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| a18 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| a19 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| a20 | conditional (unit) | 347/347 | 186/186 | -161/-161 | 196/196 | 246/254 | +| a21 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| a22 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| a23 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| a24 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| a25 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| a26 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| a27 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| a28 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| a29 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | +| a30 | approval (unit) | 124/123 | 117/116 | -7/-7 | 119/118 | 122/129 | ## Remaining hot spots (by category) -Source observations from the re-authored files, not an additive BPE attribution: - -1. **Conditional semver comparison (22 tasks, ≈150 tokens over Python).** The - KV split, four intermediate splits, six `to_int`/`list_get` bindings and the - nested lexicographic `or`/`and` take about 189 `cl100k_base` tokens in `t02` - alone. Python does it with `dict(...)`, `tuple(map(int, …))` and a tuple - `>`. A version-compare or KV-lookup builtin would hit the largest remaining gap. -2. **Unit-conditional failure collection (20 of 22 conditional tasks, +27).** - The `failed` list and second `for`/`when` loop (347 vs 320 for the loop - variant) stand in for Python's `all(...)`. An `all`/`every` or - `filter`/`count` form would remove it. -3. **Binding and envelope overhead on every task (≈6–7 tokens over Python on - write/approval tasks).** The governed-profile `raw` binding for - `parse_json`, the explicit `(do …)` in `let` bodies, the - `(dict ("k" v) …)` pair syntax and the trailing run of closing parentheses. - Allowing typed `parse_json` over an inline `read_text` under governed, and - implicit-`do` `let` bodies, are the cheap wins. +These are source observations measured with `cl100k_base` on fragments. They are not an additive attribution. + +1. **Version KV extraction (conditional, 22 tasks).** The two + `(list_get (str_split (list_get lines N) "=") 1)` operands cost 35 of the + 40 tokens in the version test; `ver_gt` itself is cheap. A pure + `kv_get`/`kv` lookup over `lines` would roughly halve this. +2. **Filter-into-list loop (all 60 tasks).** `selected (list)` plus + `(for c checks (when (= (map_get c "status") "PASS") (append selected c)))` + is about 27 tokens, against Python's 17-token comprehension. This is why the 16 + write-record tasks only tie Python. A pure `filter` + (`(filter c checks pred)`) is the obvious next form. +3. **Record and literal envelopes (all tasks).** `(dict ("batch" "02") ("selected" selected))` + costs 12 tokens. The blocked approval payload, written as an escaped JSON + string literal, costs 20 in conditional tasks. The four-binding header + (51 tokens) includes the `version`/`note` reads that every language + performs. Flatter `dict` pairs and a JSON-literal form are candidates. ## Method and reproduction @@ -179,7 +211,7 @@ Dependencies: Go, Node.js and a Python 3 with `requirements.txt` installed cached `cl100k_base`/`o200k_base` encodings. The counter disables the uncached tokenizer loader, so a missing or corrupt cache fails rather than downloading. Measured with Go 1.24.4 linux/amd64, Python 3.13.5 and Node -v20.19.2 on main `fd1c6225`, 2026-10-12. +v20.19.2 on main `f930cf6e` plus this branch, 2026-10-12. `author_solutions.py` regenerates all four languages from task metadata without reading oracle contents (run it, then `gofmt -w solutions/go`). The @@ -234,6 +266,13 @@ Pass counts: **HowlFrame 60/60, Python 60/60, JavaScript 60/60, Go 60/60.** network or processes. These are trusted references, not an isolation or injection-resistance experiment. The broad filesystem grant and audit limitations of the original protocol still apply. +- **Benchmark-shaped features:** `ver_gt`/`ver_ge`, `all`/`any`, inline + `list_get` and inline `parse_json` were added because #134 found these + shapes dominated this corpus's conditional tasks. They are general + language features with their own tests, but a benchmark that motivated a + feature overstates how much it generalizes. A fresh corpus or a + held-out task set is needed before treating these numbers as a property of + the language. - **Input scope:** each task has fixed valid checks/KV evidence. Version comparisons are numeric on the supplied strict x.y.z versions; these programs are not claimed to be general malformed-semver validators. @@ -244,10 +283,11 @@ Pass counts: **HowlFrame 60/60, Python 60/60, JavaScript 60/60, Go 60/60.** evaluation, independently authored tasks, or a blind correctness study. -HowlFrame still uses more source tokens than Python in this corpus, now by -about 6% at the median (per-task ratio 1.059) rather than 42%. Its JavaScript parity depends on the -encoding and does not hold for the conditional tasks. H1 and issue #90 are -unchanged. +HowlFrame now uses no more source tokens than Python or JavaScript on any +task in this corpus. That is a claim about these 60 synthetic references +only. The compact built-ins were designed after studying this corpus's hot +spots (see "Benchmark-shaped features" above), and the result says nothing +about model success. H1 and issue #90 are unchanged. ## Repository validation status @@ -263,7 +303,14 @@ Green locally on the box (not in a restricted sandbox), with - `gofmt -l experiments` clean. `git diff --check` flags only the CRLF line endings Python's `csv` writer has always emitted in `results/tokens.csv`. -This replaces the stale #133 section, which reported sandbox-only socket -failures and "changes left uncommitted". +Validation tests added in this slice: + +- `TestVerificationResultsCoverAndMatchSources` checks that `results/verification.json` + has exactly 60 × 4 entries, all passing, and that every SHA-256 matches the + committed source. +- `TestCompactConditionalBuiltinsArePureAndCorrect` and + `TestGovernedInlineParseJSONFailsClosed` are at the repo root. +- `internal/ast/desugar_compact_test.go` holds the unit tests for the new built-ins. -See the [journal](../../docs/journals/2026-10-12_token_benchmark_rerun.md). +See the journals: [rerun](../../docs/journals/2026-10-12_token_benchmark_rerun.md), +[compact conditionals](../../docs/journals/2026-10-12_compact_conditionals.md). diff --git a/experiments/token-efficiency-v0/author_solutions.py b/experiments/token-efficiency-v0/author_solutions.py index 9ded0b18..f75f19bb 100644 --- a/experiments/token-efficiency-v0/author_solutions.py +++ b/experiments/token-efficiency-v0/author_solutions.py @@ -5,35 +5,25 @@ ROOT = Path(__file__).resolve().parent CORPUS = ROOT.parent / 'falsifiable-v0' -# HowlFrame references use current shorthand (multi-binding let, read_text, -# lines, when, n-ary and/or). Never reads reference/arm_a or oracle contents. +# HowlFrame references use current shorthand (root do, multi-binding let, +# inline parse_json/list_get operands, read_text, lines, when, all, ver_gt). +# Never reads reference/arm_a or oracle contents. def howl_src(batch, field, value, conditional, approval): sel = f'(for c checks (when (= (map_get c "{field}") "{value}") (append selected c)))' - extra = '\n failed (list)' if conditional and field != 'status' else '' - head = ('(do\n (let (raw (read_text "evidence/checks.json"))\n (let (checks (parse_json Checks raw)\n' - + (' lines (lines (read_file "evidence/version.kv"))\n' if conditional and not approval else ' version (read_text "evidence/version.kv")\n') + head = ('(do\n (let (checks (parse_json Checks (read_text "evidence/checks.json"))\n' + + (' lines (lines (read_file "evidence/version.kv"))\n' if conditional else ' version (read_text "evidence/version.kv")\n') + ' note (read_text "evidence/note.txt")\n' - f' selected (list){extra})\n (do\n {sel}') + f' selected (list))\n (do\n {sel}') rec = f'(dict ("batch" "{batch}") ("selected" selected))' if approval: - return head + f'\n (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" {rec}))))))))\n' + return head + f'\n (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" {rec})))))))\n' if not conditional: - return head + f'\n (write_file "out/release.json" (encode_json {rec}))))))\n' - if field == 'status': - ok = '(= (list_len selected) (list_len checks))' - else: - ok = '(= (list_len failed) 0)' - head += '\n (for c checks (when (!= (map_get c "status") "PASS") (append failed c)))' + return head + f'\n (write_file "out/release.json" (encode_json {rec})))))\n' return head + ( - '\n (let (cp (str_split (list_get lines 0) "=")\n' - ' pp (str_split (list_get lines 1) "=")\n' - ' cur (str_split (list_get cp 1) ".")\n' - ' pro (str_split (list_get pp 1) ".")\n' - ' c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2))\n' - ' p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2)))\n' - f' (if (and {ok} (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2))))))\n' - f' (write_file "out/release.json" (encode_json {rec}))\n' - ' (write_file "out/approval_request.json" "{\\"reason\\":\\"blocked\\",\\"summary\\":{}}")))))))\n') + '\n (if (and (all c checks (= (map_get c "status") "PASS"))\n' + ' (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1)))\n' + f' (write_file "out/release.json" (encode_json {rec}))\n' + ' (write_file "out/approval_request.json" "{\\"reason\\":\\"blocked\\",\\"summary\\":{}}")))))\n') manifest = json.loads((CORPUS / 'tasks/manifest.json').read_text()) diff --git a/experiments/token-efficiency-v0/results/summary.json b/experiments/token-efficiency-v0/results/summary.json index b48e91f4..89fe2968 100644 --- a/experiments/token-efficiency-v0/results/summary.json +++ b/experiments/token-efficiency-v0/results/summary.json @@ -3,8 +3,8 @@ "tokens": { "languages": { "howl": { - "median": 124.0, - "mean": 200.6 + "median": 117.0, + "mean": 138.3 }, "python": { "median": 119.0, @@ -21,140 +21,18 @@ }, "howl_ratios": { "python": { - "median_per_task_ratio": 1.0588235294117647, - "ratio_of_medians": 1.0420168067226891, - "howl_more_tokens": [ - "t01", - "t02", - "t03", - "t04", - "t05", - "t06", - "t07", - "t08", - "t09", - "t10", - "t11", - "t12", - "t13", - "t14", - "t15", - "t16", - "t17", - "t18", - "t19", - "t20", - "t21", - "t22", - "t23", - "t24", - "t25", - "t26", - "t27", - "t28", - "t29", - "t30", - "a01", - "a02", - "a03", - "a04", - "a05", - "a06", - "a07", - "a08", - "a09", - "a10", - "a11", - "a12", - "a13", - "a14", - "a15", - "a16", - "a17", - "a18", - "a19", - "a20", - "a21", - "a22", - "a23", - "a24", - "a25", - "a26", - "a27", - "a28", - "a29", - "a30" - ] + "median_per_task_ratio": 0.9831932773109243, + "ratio_of_medians": 0.9831932773109243, + "howl_more_tokens": [] }, "js": { - "median_per_task_ratio": 1.0188679245283019, - "ratio_of_medians": 1.0163934426229508, - "howl_more_tokens": [ - "t01", - "t02", - "t03", - "t04", - "t05", - "t06", - "t07", - "t08", - "t09", - "t10", - "t11", - "t12", - "t13", - "t14", - "t15", - "t16", - "t17", - "t18", - "t19", - "t20", - "t21", - "t22", - "t23", - "t24", - "t25", - "t26", - "t27", - "t28", - "t29", - "t30", - "a01", - "a02", - "a03", - "a04", - "a05", - "a06", - "a07", - "a08", - "a09", - "a10", - "a11", - "a12", - "a13", - "a14", - "a15", - "a16", - "a17", - "a18", - "a19", - "a20", - "a21", - "a22", - "a23", - "a24", - "a25", - "a26", - "a27", - "a28", - "a29", - "a30" - ] + "median_per_task_ratio": 0.9590163934426229, + "ratio_of_medians": 0.9590163934426229, + "howl_more_tokens": [] }, "go": { - "median_per_task_ratio": 0.496, - "ratio_of_medians": 0.496, + "median_per_task_ratio": 0.44541484716157204, + "ratio_of_medians": 0.468, "howl_more_tokens": [] } } @@ -162,8 +40,8 @@ "tokens_nocomments": { "languages": { "howl": { - "median": 124.0, - "mean": 200.6 + "median": 117.0, + "mean": 138.3 }, "python": { "median": 119.0, @@ -180,140 +58,18 @@ }, "howl_ratios": { "python": { - "median_per_task_ratio": 1.0588235294117647, - "ratio_of_medians": 1.0420168067226891, - "howl_more_tokens": [ - "t01", - "t02", - "t03", - "t04", - "t05", - "t06", - "t07", - "t08", - "t09", - "t10", - "t11", - "t12", - "t13", - "t14", - "t15", - "t16", - "t17", - "t18", - "t19", - "t20", - "t21", - "t22", - "t23", - "t24", - "t25", - "t26", - "t27", - "t28", - "t29", - "t30", - "a01", - "a02", - "a03", - "a04", - "a05", - "a06", - "a07", - "a08", - "a09", - "a10", - "a11", - "a12", - "a13", - "a14", - "a15", - "a16", - "a17", - "a18", - "a19", - "a20", - "a21", - "a22", - "a23", - "a24", - "a25", - "a26", - "a27", - "a28", - "a29", - "a30" - ] + "median_per_task_ratio": 0.9831932773109243, + "ratio_of_medians": 0.9831932773109243, + "howl_more_tokens": [] }, "js": { - "median_per_task_ratio": 1.0188679245283019, - "ratio_of_medians": 1.0163934426229508, - "howl_more_tokens": [ - "t01", - "t02", - "t03", - "t04", - "t05", - "t06", - "t07", - "t08", - "t09", - "t10", - "t11", - "t12", - "t13", - "t14", - "t15", - "t16", - "t17", - "t18", - "t19", - "t20", - "t21", - "t22", - "t23", - "t24", - "t25", - "t26", - "t27", - "t28", - "t29", - "t30", - "a01", - "a02", - "a03", - "a04", - "a05", - "a06", - "a07", - "a08", - "a09", - "a10", - "a11", - "a12", - "a13", - "a14", - "a15", - "a16", - "a17", - "a18", - "a19", - "a20", - "a21", - "a22", - "a23", - "a24", - "a25", - "a26", - "a27", - "a28", - "a29", - "a30" - ] + "median_per_task_ratio": 0.9590163934426229, + "ratio_of_medians": 0.9590163934426229, + "howl_more_tokens": [] }, "go": { - "median_per_task_ratio": 0.5081967213114754, - "ratio_of_medians": 0.5081967213114754, + "median_per_task_ratio": 0.45739910313901344, + "ratio_of_medians": 0.47950819672131145, "howl_more_tokens": [] } } @@ -323,8 +79,8 @@ "tokens": { "languages": { "howl": { - "median": 123.0, - "mean": 200.5 + "median": 116.0, + "mean": 138.2 }, "python": { "median": 118.0, @@ -341,102 +97,18 @@ }, "howl_ratios": { "python": { - "median_per_task_ratio": 1.058252427184466, - "ratio_of_medians": 1.0423728813559323, - "howl_more_tokens": [ - "t01", - "t02", - "t03", - "t04", - "t05", - "t06", - "t07", - "t08", - "t09", - "t10", - "t11", - "t12", - "t13", - "t14", - "t15", - "t16", - "t17", - "t18", - "t19", - "t20", - "t21", - "t22", - "t23", - "t24", - "t25", - "t26", - "t27", - "t28", - "t29", - "t30", - "a01", - "a02", - "a03", - "a04", - "a05", - "a06", - "a07", - "a08", - "a09", - "a10", - "a11", - "a12", - "a13", - "a14", - "a15", - "a16", - "a17", - "a18", - "a19", - "a20", - "a21", - "a22", - "a23", - "a24", - "a25", - "a26", - "a27", - "a28", - "a29", - "a30" - ] + "median_per_task_ratio": 0.9830508474576272, + "ratio_of_medians": 0.9830508474576272, + "howl_more_tokens": [] }, "js": { - "median_per_task_ratio": 0.9534883720930233, - "ratio_of_medians": 0.9534883720930233, - "howl_more_tokens": [ - "t02", - "t11", - "t12", - "t13", - "t14", - "t15", - "t16", - "t17", - "t18", - "t19", - "t20", - "a02", - "a11", - "a12", - "a13", - "a14", - "a15", - "a16", - "a17", - "a18", - "a19", - "a20" - ] + "median_per_task_ratio": 0.8956521739130435, + "ratio_of_medians": 0.8992248062015504, + "howl_more_tokens": [] }, "go": { - "median_per_task_ratio": 0.492, - "ratio_of_medians": 0.492, + "median_per_task_ratio": 0.4458874458874459, + "ratio_of_medians": 0.464, "howl_more_tokens": [] } } @@ -444,8 +116,8 @@ "tokens_nocomments": { "languages": { "howl": { - "median": 123.0, - "mean": 200.5 + "median": 116.0, + "mean": 138.2 }, "python": { "median": 118.0, @@ -462,102 +134,18 @@ }, "howl_ratios": { "python": { - "median_per_task_ratio": 1.058252427184466, - "ratio_of_medians": 1.0423728813559323, - "howl_more_tokens": [ - "t01", - "t02", - "t03", - "t04", - "t05", - "t06", - "t07", - "t08", - "t09", - "t10", - "t11", - "t12", - "t13", - "t14", - "t15", - "t16", - "t17", - "t18", - "t19", - "t20", - "t21", - "t22", - "t23", - "t24", - "t25", - "t26", - "t27", - "t28", - "t29", - "t30", - "a01", - "a02", - "a03", - "a04", - "a05", - "a06", - "a07", - "a08", - "a09", - "a10", - "a11", - "a12", - "a13", - "a14", - "a15", - "a16", - "a17", - "a18", - "a19", - "a20", - "a21", - "a22", - "a23", - "a24", - "a25", - "a26", - "a27", - "a28", - "a29", - "a30" - ] + "median_per_task_ratio": 0.9830508474576272, + "ratio_of_medians": 0.9830508474576272, + "howl_more_tokens": [] }, "js": { - "median_per_task_ratio": 0.9534883720930233, - "ratio_of_medians": 0.9534883720930233, - "howl_more_tokens": [ - "t02", - "t11", - "t12", - "t13", - "t14", - "t15", - "t16", - "t17", - "t18", - "t19", - "t20", - "a02", - "a11", - "a12", - "a13", - "a14", - "a15", - "a16", - "a17", - "a18", - "a19", - "a20" - ] + "median_per_task_ratio": 0.8956521739130435, + "ratio_of_medians": 0.8992248062015504, + "howl_more_tokens": [] }, "go": { - "median_per_task_ratio": 0.5040983606557377, - "ratio_of_medians": 0.5040983606557377, + "median_per_task_ratio": 0.4577777777777778, + "ratio_of_medians": 0.47540983606557374, "howl_more_tokens": [] } } diff --git a/experiments/token-efficiency-v0/results/tokens.csv b/experiments/token-efficiency-v0/results/tokens.csv index 8ea57603..bb85bd4e 100644 --- a/experiments/token-efficiency-v0/results/tokens.csv +++ b/experiments/token-efficiency-v0/results/tokens.csv @@ -1,478 +1,478 @@ task,lang,encoding,tokens,tokens_nocomments,bytes,pass -t01,howl,cl100k_base,108,108,386,True -t01,howl,o200k_base,109,109,386,True +t01,howl,cl100k_base,102,102,369,True +t01,howl,o200k_base,103,103,369,True t01,python,cl100k_base,102,102,393,True t01,python,o200k_base,103,103,393,True t01,js,cl100k_base,106,106,425,True t01,js,o200k_base,115,115,425,True t01,go,cl100k_base,229,223,827,True t01,go,o200k_base,231,225,827,True -t02,howl,cl100k_base,320,320,989,True -t02,howl,o200k_base,320,320,989,True +t02,howl,cl100k_base,186,186,641,True +t02,howl,o200k_base,186,186,641,True t02,python,cl100k_base,196,196,762,True t02,python,o200k_base,196,196,762,True t02,js,cl100k_base,246,246,962,True t02,js,o200k_base,254,254,962,True t02,go,cl100k_base,478,472,1682,True t02,go,o200k_base,479,473,1682,True -t03,howl,cl100k_base,124,124,442,True -t03,howl,o200k_base,123,123,442,True +t03,howl,cl100k_base,117,117,425,True +t03,howl,o200k_base,116,116,425,True t03,python,cl100k_base,119,119,459,True t03,python,o200k_base,118,118,459,True t03,js,cl100k_base,122,122,490,True t03,js,o200k_base,129,129,490,True t03,go,cl100k_base,250,244,916,True t03,go,o200k_base,250,244,916,True -t04,howl,cl100k_base,108,108,386,True -t04,howl,o200k_base,109,109,386,True +t04,howl,cl100k_base,102,102,369,True +t04,howl,o200k_base,103,103,369,True t04,python,cl100k_base,102,102,393,True t04,python,o200k_base,103,103,393,True t04,js,cl100k_base,106,106,425,True t04,js,o200k_base,115,115,425,True t04,go,cl100k_base,229,223,827,True t04,go,o200k_base,231,225,827,True -t05,howl,cl100k_base,108,108,386,True -t05,howl,o200k_base,109,109,386,True +t05,howl,cl100k_base,102,102,369,True +t05,howl,o200k_base,103,103,369,True t05,python,cl100k_base,102,102,393,True t05,python,o200k_base,103,103,393,True t05,js,cl100k_base,106,106,425,True t05,js,o200k_base,115,115,425,True t05,go,cl100k_base,229,223,827,True t05,go,o200k_base,231,225,827,True -t06,howl,cl100k_base,108,108,386,True -t06,howl,o200k_base,109,109,386,True +t06,howl,cl100k_base,102,102,369,True +t06,howl,o200k_base,103,103,369,True t06,python,cl100k_base,102,102,393,True t06,python,o200k_base,103,103,393,True t06,js,cl100k_base,106,106,425,True t06,js,o200k_base,115,115,425,True t06,go,cl100k_base,229,223,827,True t06,go,o200k_base,231,225,827,True -t07,howl,cl100k_base,108,108,386,True -t07,howl,o200k_base,109,109,386,True +t07,howl,cl100k_base,102,102,369,True +t07,howl,o200k_base,103,103,369,True t07,python,cl100k_base,102,102,393,True t07,python,o200k_base,103,103,393,True t07,js,cl100k_base,106,106,425,True t07,js,o200k_base,115,115,425,True t07,go,cl100k_base,229,223,827,True t07,go,o200k_base,231,225,827,True -t08,howl,cl100k_base,108,108,386,True -t08,howl,o200k_base,109,109,386,True +t08,howl,cl100k_base,102,102,369,True +t08,howl,o200k_base,103,103,369,True t08,python,cl100k_base,102,102,393,True t08,python,o200k_base,103,103,393,True t08,js,cl100k_base,106,106,425,True t08,js,o200k_base,115,115,425,True t08,go,cl100k_base,229,223,827,True t08,go,o200k_base,231,225,827,True -t09,howl,cl100k_base,108,108,386,True -t09,howl,o200k_base,109,109,386,True +t09,howl,cl100k_base,102,102,369,True +t09,howl,o200k_base,103,103,369,True t09,python,cl100k_base,102,102,393,True t09,python,o200k_base,103,103,393,True t09,js,cl100k_base,106,106,425,True t09,js,o200k_base,115,115,425,True t09,go,cl100k_base,229,223,827,True t09,go,o200k_base,231,225,827,True -t10,howl,cl100k_base,108,108,386,True -t10,howl,o200k_base,109,109,386,True +t10,howl,cl100k_base,102,102,369,True +t10,howl,o200k_base,103,103,369,True t10,python,cl100k_base,102,102,393,True t10,python,o200k_base,103,103,393,True t10,js,cl100k_base,106,106,425,True t10,js,o200k_base,115,115,425,True t10,go,cl100k_base,229,223,827,True t10,go,o200k_base,231,225,827,True -t11,howl,cl100k_base,347,347,1066,True -t11,howl,o200k_base,347,347,1066,True +t11,howl,cl100k_base,186,186,639,True +t11,howl,o200k_base,186,186,639,True t11,python,cl100k_base,196,196,760,True t11,python,o200k_base,196,196,760,True t11,js,cl100k_base,246,246,960,True t11,js,o200k_base,254,254,960,True t11,go,cl100k_base,478,472,1680,True t11,go,o200k_base,479,473,1680,True -t12,howl,cl100k_base,347,347,1066,True -t12,howl,o200k_base,347,347,1066,True +t12,howl,cl100k_base,186,186,639,True +t12,howl,o200k_base,186,186,639,True t12,python,cl100k_base,196,196,760,True t12,python,o200k_base,196,196,760,True t12,js,cl100k_base,246,246,960,True t12,js,o200k_base,254,254,960,True t12,go,cl100k_base,478,472,1680,True t12,go,o200k_base,479,473,1680,True -t13,howl,cl100k_base,347,347,1066,True -t13,howl,o200k_base,347,347,1066,True +t13,howl,cl100k_base,186,186,639,True +t13,howl,o200k_base,186,186,639,True t13,python,cl100k_base,196,196,760,True t13,python,o200k_base,196,196,760,True t13,js,cl100k_base,246,246,960,True t13,js,o200k_base,254,254,960,True t13,go,cl100k_base,478,472,1680,True t13,go,o200k_base,479,473,1680,True -t14,howl,cl100k_base,347,347,1066,True -t14,howl,o200k_base,347,347,1066,True +t14,howl,cl100k_base,186,186,639,True +t14,howl,o200k_base,186,186,639,True t14,python,cl100k_base,196,196,760,True t14,python,o200k_base,196,196,760,True t14,js,cl100k_base,246,246,960,True t14,js,o200k_base,254,254,960,True t14,go,cl100k_base,478,472,1680,True t14,go,o200k_base,479,473,1680,True -t15,howl,cl100k_base,347,347,1066,True -t15,howl,o200k_base,347,347,1066,True +t15,howl,cl100k_base,186,186,639,True +t15,howl,o200k_base,186,186,639,True t15,python,cl100k_base,196,196,760,True t15,python,o200k_base,196,196,760,True t15,js,cl100k_base,246,246,960,True t15,js,o200k_base,254,254,960,True t15,go,cl100k_base,478,472,1680,True t15,go,o200k_base,479,473,1680,True -t16,howl,cl100k_base,347,347,1066,True -t16,howl,o200k_base,347,347,1066,True +t16,howl,cl100k_base,186,186,639,True +t16,howl,o200k_base,186,186,639,True t16,python,cl100k_base,196,196,760,True t16,python,o200k_base,196,196,760,True t16,js,cl100k_base,246,246,960,True t16,js,o200k_base,254,254,960,True t16,go,cl100k_base,478,472,1680,True t16,go,o200k_base,479,473,1680,True -t17,howl,cl100k_base,347,347,1066,True -t17,howl,o200k_base,347,347,1066,True +t17,howl,cl100k_base,186,186,639,True +t17,howl,o200k_base,186,186,639,True t17,python,cl100k_base,196,196,760,True t17,python,o200k_base,196,196,760,True t17,js,cl100k_base,246,246,960,True t17,js,o200k_base,254,254,960,True t17,go,cl100k_base,478,472,1680,True t17,go,o200k_base,479,473,1680,True -t18,howl,cl100k_base,347,347,1066,True -t18,howl,o200k_base,347,347,1066,True +t18,howl,cl100k_base,186,186,639,True +t18,howl,o200k_base,186,186,639,True t18,python,cl100k_base,196,196,760,True t18,python,o200k_base,196,196,760,True t18,js,cl100k_base,246,246,960,True t18,js,o200k_base,254,254,960,True t18,go,cl100k_base,478,472,1680,True t18,go,o200k_base,479,473,1680,True -t19,howl,cl100k_base,347,347,1066,True -t19,howl,o200k_base,347,347,1066,True +t19,howl,cl100k_base,186,186,639,True +t19,howl,o200k_base,186,186,639,True t19,python,cl100k_base,196,196,760,True t19,python,o200k_base,196,196,760,True t19,js,cl100k_base,246,246,960,True t19,js,o200k_base,254,254,960,True t19,go,cl100k_base,478,472,1680,True t19,go,o200k_base,479,473,1680,True -t20,howl,cl100k_base,347,347,1066,True -t20,howl,o200k_base,347,347,1066,True +t20,howl,cl100k_base,186,186,639,True +t20,howl,o200k_base,186,186,639,True t20,python,cl100k_base,196,196,760,True t20,python,o200k_base,196,196,760,True t20,js,cl100k_base,246,246,960,True t20,js,o200k_base,254,254,960,True t20,go,cl100k_base,478,472,1680,True t20,go,o200k_base,479,473,1680,True -t21,howl,cl100k_base,124,124,440,True -t21,howl,o200k_base,123,123,440,True +t21,howl,cl100k_base,117,117,423,True +t21,howl,o200k_base,116,116,423,True t21,python,cl100k_base,119,119,457,True t21,python,o200k_base,118,118,457,True t21,js,cl100k_base,122,122,488,True t21,js,o200k_base,129,129,488,True t21,go,cl100k_base,250,244,914,True t21,go,o200k_base,250,244,914,True -t22,howl,cl100k_base,124,124,440,True -t22,howl,o200k_base,123,123,440,True +t22,howl,cl100k_base,117,117,423,True +t22,howl,o200k_base,116,116,423,True t22,python,cl100k_base,119,119,457,True t22,python,o200k_base,118,118,457,True t22,js,cl100k_base,122,122,488,True t22,js,o200k_base,129,129,488,True t22,go,cl100k_base,250,244,914,True t22,go,o200k_base,250,244,914,True -t23,howl,cl100k_base,124,124,440,True -t23,howl,o200k_base,123,123,440,True +t23,howl,cl100k_base,117,117,423,True +t23,howl,o200k_base,116,116,423,True t23,python,cl100k_base,119,119,457,True t23,python,o200k_base,118,118,457,True t23,js,cl100k_base,122,122,488,True t23,js,o200k_base,129,129,488,True t23,go,cl100k_base,250,244,914,True t23,go,o200k_base,250,244,914,True -t24,howl,cl100k_base,124,124,440,True -t24,howl,o200k_base,123,123,440,True +t24,howl,cl100k_base,117,117,423,True +t24,howl,o200k_base,116,116,423,True t24,python,cl100k_base,119,119,457,True t24,python,o200k_base,118,118,457,True t24,js,cl100k_base,122,122,488,True t24,js,o200k_base,129,129,488,True t24,go,cl100k_base,250,244,914,True t24,go,o200k_base,250,244,914,True -t25,howl,cl100k_base,124,124,440,True -t25,howl,o200k_base,123,123,440,True +t25,howl,cl100k_base,117,117,423,True +t25,howl,o200k_base,116,116,423,True t25,python,cl100k_base,119,119,457,True t25,python,o200k_base,118,118,457,True t25,js,cl100k_base,122,122,488,True t25,js,o200k_base,129,129,488,True t25,go,cl100k_base,250,244,914,True t25,go,o200k_base,250,244,914,True -t26,howl,cl100k_base,124,124,440,True -t26,howl,o200k_base,123,123,440,True +t26,howl,cl100k_base,117,117,423,True +t26,howl,o200k_base,116,116,423,True t26,python,cl100k_base,119,119,457,True t26,python,o200k_base,118,118,457,True t26,js,cl100k_base,122,122,488,True t26,js,o200k_base,129,129,488,True t26,go,cl100k_base,250,244,914,True t26,go,o200k_base,250,244,914,True -t27,howl,cl100k_base,124,124,440,True -t27,howl,o200k_base,123,123,440,True +t27,howl,cl100k_base,117,117,423,True +t27,howl,o200k_base,116,116,423,True t27,python,cl100k_base,119,119,457,True t27,python,o200k_base,118,118,457,True t27,js,cl100k_base,122,122,488,True t27,js,o200k_base,129,129,488,True t27,go,cl100k_base,250,244,914,True t27,go,o200k_base,250,244,914,True -t28,howl,cl100k_base,124,124,440,True -t28,howl,o200k_base,123,123,440,True +t28,howl,cl100k_base,117,117,423,True +t28,howl,o200k_base,116,116,423,True t28,python,cl100k_base,119,119,457,True t28,python,o200k_base,118,118,457,True t28,js,cl100k_base,122,122,488,True t28,js,o200k_base,129,129,488,True t28,go,cl100k_base,250,244,914,True t28,go,o200k_base,250,244,914,True -t29,howl,cl100k_base,124,124,440,True -t29,howl,o200k_base,123,123,440,True +t29,howl,cl100k_base,117,117,423,True +t29,howl,o200k_base,116,116,423,True t29,python,cl100k_base,119,119,457,True t29,python,o200k_base,118,118,457,True t29,js,cl100k_base,122,122,488,True t29,js,o200k_base,129,129,488,True t29,go,cl100k_base,250,244,914,True t29,go,o200k_base,250,244,914,True -t30,howl,cl100k_base,124,124,440,True -t30,howl,o200k_base,123,123,440,True +t30,howl,cl100k_base,117,117,423,True +t30,howl,o200k_base,116,116,423,True t30,python,cl100k_base,119,119,457,True t30,python,o200k_base,118,118,457,True t30,js,cl100k_base,122,122,488,True t30,js,o200k_base,129,129,488,True t30,go,cl100k_base,250,244,914,True t30,go,o200k_base,250,244,914,True -a01,howl,cl100k_base,108,108,386,True -a01,howl,o200k_base,109,109,386,True +a01,howl,cl100k_base,102,102,369,True +a01,howl,o200k_base,103,103,369,True a01,python,cl100k_base,102,102,393,True a01,python,o200k_base,103,103,393,True a01,js,cl100k_base,106,106,425,True a01,js,o200k_base,115,115,425,True a01,go,cl100k_base,229,223,827,True a01,go,o200k_base,231,225,827,True -a02,howl,cl100k_base,320,320,989,True -a02,howl,o200k_base,320,320,989,True +a02,howl,cl100k_base,186,186,641,True +a02,howl,o200k_base,186,186,641,True a02,python,cl100k_base,196,196,762,True a02,python,o200k_base,196,196,762,True a02,js,cl100k_base,246,246,962,True a02,js,o200k_base,254,254,962,True a02,go,cl100k_base,478,472,1682,True a02,go,o200k_base,479,473,1682,True -a03,howl,cl100k_base,124,124,442,True -a03,howl,o200k_base,123,123,442,True +a03,howl,cl100k_base,117,117,425,True +a03,howl,o200k_base,116,116,425,True a03,python,cl100k_base,119,119,459,True a03,python,o200k_base,118,118,459,True a03,js,cl100k_base,122,122,490,True a03,js,o200k_base,129,129,490,True a03,go,cl100k_base,250,244,916,True a03,go,o200k_base,250,244,916,True -a04,howl,cl100k_base,108,108,386,True -a04,howl,o200k_base,109,109,386,True +a04,howl,cl100k_base,102,102,369,True +a04,howl,o200k_base,103,103,369,True a04,python,cl100k_base,102,102,393,True a04,python,o200k_base,103,103,393,True a04,js,cl100k_base,106,106,425,True a04,js,o200k_base,115,115,425,True a04,go,cl100k_base,229,223,827,True a04,go,o200k_base,231,225,827,True -a05,howl,cl100k_base,108,108,386,True -a05,howl,o200k_base,109,109,386,True +a05,howl,cl100k_base,102,102,369,True +a05,howl,o200k_base,103,103,369,True a05,python,cl100k_base,102,102,393,True a05,python,o200k_base,103,103,393,True a05,js,cl100k_base,106,106,425,True a05,js,o200k_base,115,115,425,True a05,go,cl100k_base,229,223,827,True a05,go,o200k_base,231,225,827,True -a06,howl,cl100k_base,108,108,386,True -a06,howl,o200k_base,109,109,386,True +a06,howl,cl100k_base,102,102,369,True +a06,howl,o200k_base,103,103,369,True a06,python,cl100k_base,102,102,393,True a06,python,o200k_base,103,103,393,True a06,js,cl100k_base,106,106,425,True a06,js,o200k_base,115,115,425,True a06,go,cl100k_base,229,223,827,True a06,go,o200k_base,231,225,827,True -a07,howl,cl100k_base,108,108,386,True -a07,howl,o200k_base,109,109,386,True +a07,howl,cl100k_base,102,102,369,True +a07,howl,o200k_base,103,103,369,True a07,python,cl100k_base,102,102,393,True a07,python,o200k_base,103,103,393,True a07,js,cl100k_base,106,106,425,True a07,js,o200k_base,115,115,425,True a07,go,cl100k_base,229,223,827,True a07,go,o200k_base,231,225,827,True -a08,howl,cl100k_base,108,108,386,True -a08,howl,o200k_base,109,109,386,True +a08,howl,cl100k_base,102,102,369,True +a08,howl,o200k_base,103,103,369,True a08,python,cl100k_base,102,102,393,True a08,python,o200k_base,103,103,393,True a08,js,cl100k_base,106,106,425,True a08,js,o200k_base,115,115,425,True a08,go,cl100k_base,229,223,827,True a08,go,o200k_base,231,225,827,True -a09,howl,cl100k_base,108,108,386,True -a09,howl,o200k_base,109,109,386,True +a09,howl,cl100k_base,102,102,369,True +a09,howl,o200k_base,103,103,369,True a09,python,cl100k_base,102,102,393,True a09,python,o200k_base,103,103,393,True a09,js,cl100k_base,106,106,425,True a09,js,o200k_base,115,115,425,True a09,go,cl100k_base,229,223,827,True a09,go,o200k_base,231,225,827,True -a10,howl,cl100k_base,108,108,386,True -a10,howl,o200k_base,109,109,386,True +a10,howl,cl100k_base,102,102,369,True +a10,howl,o200k_base,103,103,369,True a10,python,cl100k_base,102,102,393,True a10,python,o200k_base,103,103,393,True a10,js,cl100k_base,106,106,425,True a10,js,o200k_base,115,115,425,True a10,go,cl100k_base,229,223,827,True a10,go,o200k_base,231,225,827,True -a11,howl,cl100k_base,347,347,1066,True -a11,howl,o200k_base,347,347,1066,True +a11,howl,cl100k_base,186,186,639,True +a11,howl,o200k_base,186,186,639,True a11,python,cl100k_base,196,196,760,True a11,python,o200k_base,196,196,760,True a11,js,cl100k_base,246,246,960,True a11,js,o200k_base,254,254,960,True a11,go,cl100k_base,478,472,1680,True a11,go,o200k_base,479,473,1680,True -a12,howl,cl100k_base,347,347,1066,True -a12,howl,o200k_base,347,347,1066,True +a12,howl,cl100k_base,186,186,639,True +a12,howl,o200k_base,186,186,639,True a12,python,cl100k_base,196,196,760,True a12,python,o200k_base,196,196,760,True a12,js,cl100k_base,246,246,960,True a12,js,o200k_base,254,254,960,True a12,go,cl100k_base,478,472,1680,True a12,go,o200k_base,479,473,1680,True -a13,howl,cl100k_base,347,347,1066,True -a13,howl,o200k_base,347,347,1066,True +a13,howl,cl100k_base,186,186,639,True +a13,howl,o200k_base,186,186,639,True a13,python,cl100k_base,196,196,760,True a13,python,o200k_base,196,196,760,True a13,js,cl100k_base,246,246,960,True a13,js,o200k_base,254,254,960,True a13,go,cl100k_base,478,472,1680,True a13,go,o200k_base,479,473,1680,True -a14,howl,cl100k_base,347,347,1066,True -a14,howl,o200k_base,347,347,1066,True +a14,howl,cl100k_base,186,186,639,True +a14,howl,o200k_base,186,186,639,True a14,python,cl100k_base,196,196,760,True a14,python,o200k_base,196,196,760,True a14,js,cl100k_base,246,246,960,True a14,js,o200k_base,254,254,960,True a14,go,cl100k_base,478,472,1680,True a14,go,o200k_base,479,473,1680,True -a15,howl,cl100k_base,347,347,1066,True -a15,howl,o200k_base,347,347,1066,True +a15,howl,cl100k_base,186,186,639,True +a15,howl,o200k_base,186,186,639,True a15,python,cl100k_base,196,196,760,True a15,python,o200k_base,196,196,760,True a15,js,cl100k_base,246,246,960,True a15,js,o200k_base,254,254,960,True a15,go,cl100k_base,478,472,1680,True a15,go,o200k_base,479,473,1680,True -a16,howl,cl100k_base,347,347,1066,True -a16,howl,o200k_base,347,347,1066,True +a16,howl,cl100k_base,186,186,639,True +a16,howl,o200k_base,186,186,639,True a16,python,cl100k_base,196,196,760,True a16,python,o200k_base,196,196,760,True a16,js,cl100k_base,246,246,960,True a16,js,o200k_base,254,254,960,True a16,go,cl100k_base,478,472,1680,True a16,go,o200k_base,479,473,1680,True -a17,howl,cl100k_base,347,347,1066,True -a17,howl,o200k_base,347,347,1066,True +a17,howl,cl100k_base,186,186,639,True +a17,howl,o200k_base,186,186,639,True a17,python,cl100k_base,196,196,760,True a17,python,o200k_base,196,196,760,True a17,js,cl100k_base,246,246,960,True a17,js,o200k_base,254,254,960,True a17,go,cl100k_base,478,472,1680,True a17,go,o200k_base,479,473,1680,True -a18,howl,cl100k_base,347,347,1066,True -a18,howl,o200k_base,347,347,1066,True +a18,howl,cl100k_base,186,186,639,True +a18,howl,o200k_base,186,186,639,True a18,python,cl100k_base,196,196,760,True a18,python,o200k_base,196,196,760,True a18,js,cl100k_base,246,246,960,True a18,js,o200k_base,254,254,960,True a18,go,cl100k_base,478,472,1680,True a18,go,o200k_base,479,473,1680,True -a19,howl,cl100k_base,347,347,1066,True -a19,howl,o200k_base,347,347,1066,True +a19,howl,cl100k_base,186,186,639,True +a19,howl,o200k_base,186,186,639,True a19,python,cl100k_base,196,196,760,True a19,python,o200k_base,196,196,760,True a19,js,cl100k_base,246,246,960,True a19,js,o200k_base,254,254,960,True a19,go,cl100k_base,478,472,1680,True a19,go,o200k_base,479,473,1680,True -a20,howl,cl100k_base,347,347,1066,True -a20,howl,o200k_base,347,347,1066,True +a20,howl,cl100k_base,186,186,639,True +a20,howl,o200k_base,186,186,639,True a20,python,cl100k_base,196,196,760,True a20,python,o200k_base,196,196,760,True a20,js,cl100k_base,246,246,960,True a20,js,o200k_base,254,254,960,True a20,go,cl100k_base,478,472,1680,True a20,go,o200k_base,479,473,1680,True -a21,howl,cl100k_base,124,124,440,True -a21,howl,o200k_base,123,123,440,True +a21,howl,cl100k_base,117,117,423,True +a21,howl,o200k_base,116,116,423,True a21,python,cl100k_base,119,119,457,True a21,python,o200k_base,118,118,457,True a21,js,cl100k_base,122,122,488,True a21,js,o200k_base,129,129,488,True a21,go,cl100k_base,250,244,914,True a21,go,o200k_base,250,244,914,True -a22,howl,cl100k_base,124,124,440,True -a22,howl,o200k_base,123,123,440,True +a22,howl,cl100k_base,117,117,423,True +a22,howl,o200k_base,116,116,423,True a22,python,cl100k_base,119,119,457,True a22,python,o200k_base,118,118,457,True a22,js,cl100k_base,122,122,488,True a22,js,o200k_base,129,129,488,True a22,go,cl100k_base,250,244,914,True a22,go,o200k_base,250,244,914,True -a23,howl,cl100k_base,124,124,440,True -a23,howl,o200k_base,123,123,440,True +a23,howl,cl100k_base,117,117,423,True +a23,howl,o200k_base,116,116,423,True a23,python,cl100k_base,119,119,457,True a23,python,o200k_base,118,118,457,True a23,js,cl100k_base,122,122,488,True a23,js,o200k_base,129,129,488,True a23,go,cl100k_base,250,244,914,True a23,go,o200k_base,250,244,914,True -a24,howl,cl100k_base,124,124,440,True -a24,howl,o200k_base,123,123,440,True +a24,howl,cl100k_base,117,117,423,True +a24,howl,o200k_base,116,116,423,True a24,python,cl100k_base,119,119,457,True a24,python,o200k_base,118,118,457,True a24,js,cl100k_base,122,122,488,True a24,js,o200k_base,129,129,488,True a24,go,cl100k_base,250,244,914,True a24,go,o200k_base,250,244,914,True -a25,howl,cl100k_base,124,124,440,True -a25,howl,o200k_base,123,123,440,True +a25,howl,cl100k_base,117,117,423,True +a25,howl,o200k_base,116,116,423,True a25,python,cl100k_base,119,119,457,True a25,python,o200k_base,118,118,457,True a25,js,cl100k_base,122,122,488,True a25,js,o200k_base,129,129,488,True a25,go,cl100k_base,250,244,914,True a25,go,o200k_base,250,244,914,True -a26,howl,cl100k_base,124,124,440,True -a26,howl,o200k_base,123,123,440,True +a26,howl,cl100k_base,117,117,423,True +a26,howl,o200k_base,116,116,423,True a26,python,cl100k_base,119,119,457,True a26,python,o200k_base,118,118,457,True a26,js,cl100k_base,122,122,488,True a26,js,o200k_base,129,129,488,True a26,go,cl100k_base,250,244,914,True a26,go,o200k_base,250,244,914,True -a27,howl,cl100k_base,124,124,440,True -a27,howl,o200k_base,123,123,440,True +a27,howl,cl100k_base,117,117,423,True +a27,howl,o200k_base,116,116,423,True a27,python,cl100k_base,119,119,457,True a27,python,o200k_base,118,118,457,True a27,js,cl100k_base,122,122,488,True a27,js,o200k_base,129,129,488,True a27,go,cl100k_base,250,244,914,True a27,go,o200k_base,250,244,914,True -a28,howl,cl100k_base,124,124,440,True -a28,howl,o200k_base,123,123,440,True +a28,howl,cl100k_base,117,117,423,True +a28,howl,o200k_base,116,116,423,True a28,python,cl100k_base,119,119,457,True a28,python,o200k_base,118,118,457,True a28,js,cl100k_base,122,122,488,True a28,js,o200k_base,129,129,488,True a28,go,cl100k_base,250,244,914,True a28,go,o200k_base,250,244,914,True -a29,howl,cl100k_base,124,124,440,True -a29,howl,o200k_base,123,123,440,True +a29,howl,cl100k_base,117,117,423,True +a29,howl,o200k_base,116,116,423,True a29,python,cl100k_base,119,119,457,True a29,python,o200k_base,118,118,457,True a29,js,cl100k_base,122,122,488,True a29,js,o200k_base,129,129,488,True a29,go,cl100k_base,250,244,914,True a29,go,o200k_base,250,244,914,True -a30,howl,cl100k_base,124,124,440,True -a30,howl,o200k_base,123,123,440,True +a30,howl,cl100k_base,117,117,423,True +a30,howl,o200k_base,116,116,423,True a30,python,cl100k_base,119,119,457,True a30,python,o200k_base,118,118,457,True a30,js,cl100k_base,122,122,488,True diff --git a/experiments/token-efficiency-v0/results/tokens.json b/experiments/token-efficiency-v0/results/tokens.json index 90902f34..416ebffb 100644 --- a/experiments/token-efficiency-v0/results/tokens.json +++ b/experiments/token-efficiency-v0/results/tokens.json @@ -3,18 +3,18 @@ "task": "t01", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "t01", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -75,18 +75,18 @@ "task": "t02", "lang": "howl", "encoding": "cl100k_base", - "tokens": 320, - "tokens_nocomments": 320, - "bytes": 989, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 641, "pass": true }, { "task": "t02", "lang": "howl", "encoding": "o200k_base", - "tokens": 320, - "tokens_nocomments": 320, - "bytes": 989, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 641, "pass": true }, { @@ -147,18 +147,18 @@ "task": "t03", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 442, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 425, "pass": true }, { "task": "t03", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 442, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 425, "pass": true }, { @@ -219,18 +219,18 @@ "task": "t04", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "t04", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -291,18 +291,18 @@ "task": "t05", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "t05", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -363,18 +363,18 @@ "task": "t06", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "t06", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -435,18 +435,18 @@ "task": "t07", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "t07", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -507,18 +507,18 @@ "task": "t08", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "t08", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -579,18 +579,18 @@ "task": "t09", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "t09", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -651,18 +651,18 @@ "task": "t10", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "t10", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -723,18 +723,18 @@ "task": "t11", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "t11", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -795,18 +795,18 @@ "task": "t12", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "t12", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -867,18 +867,18 @@ "task": "t13", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "t13", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -939,18 +939,18 @@ "task": "t14", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "t14", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -1011,18 +1011,18 @@ "task": "t15", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "t15", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -1083,18 +1083,18 @@ "task": "t16", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "t16", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -1155,18 +1155,18 @@ "task": "t17", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "t17", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -1227,18 +1227,18 @@ "task": "t18", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "t18", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -1299,18 +1299,18 @@ "task": "t19", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "t19", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -1371,18 +1371,18 @@ "task": "t20", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "t20", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -1443,18 +1443,18 @@ "task": "t21", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "t21", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -1515,18 +1515,18 @@ "task": "t22", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "t22", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -1587,18 +1587,18 @@ "task": "t23", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "t23", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -1659,18 +1659,18 @@ "task": "t24", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "t24", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -1731,18 +1731,18 @@ "task": "t25", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "t25", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -1803,18 +1803,18 @@ "task": "t26", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "t26", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -1875,18 +1875,18 @@ "task": "t27", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "t27", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -1947,18 +1947,18 @@ "task": "t28", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "t28", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -2019,18 +2019,18 @@ "task": "t29", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "t29", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -2091,18 +2091,18 @@ "task": "t30", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "t30", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -2163,18 +2163,18 @@ "task": "a01", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "a01", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -2235,18 +2235,18 @@ "task": "a02", "lang": "howl", "encoding": "cl100k_base", - "tokens": 320, - "tokens_nocomments": 320, - "bytes": 989, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 641, "pass": true }, { "task": "a02", "lang": "howl", "encoding": "o200k_base", - "tokens": 320, - "tokens_nocomments": 320, - "bytes": 989, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 641, "pass": true }, { @@ -2307,18 +2307,18 @@ "task": "a03", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 442, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 425, "pass": true }, { "task": "a03", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 442, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 425, "pass": true }, { @@ -2379,18 +2379,18 @@ "task": "a04", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "a04", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -2451,18 +2451,18 @@ "task": "a05", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "a05", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -2523,18 +2523,18 @@ "task": "a06", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "a06", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -2595,18 +2595,18 @@ "task": "a07", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "a07", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -2667,18 +2667,18 @@ "task": "a08", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "a08", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -2739,18 +2739,18 @@ "task": "a09", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "a09", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -2811,18 +2811,18 @@ "task": "a10", "lang": "howl", "encoding": "cl100k_base", - "tokens": 108, - "tokens_nocomments": 108, - "bytes": 386, + "tokens": 102, + "tokens_nocomments": 102, + "bytes": 369, "pass": true }, { "task": "a10", "lang": "howl", "encoding": "o200k_base", - "tokens": 109, - "tokens_nocomments": 109, - "bytes": 386, + "tokens": 103, + "tokens_nocomments": 103, + "bytes": 369, "pass": true }, { @@ -2883,18 +2883,18 @@ "task": "a11", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "a11", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -2955,18 +2955,18 @@ "task": "a12", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "a12", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -3027,18 +3027,18 @@ "task": "a13", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "a13", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -3099,18 +3099,18 @@ "task": "a14", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "a14", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -3171,18 +3171,18 @@ "task": "a15", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "a15", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -3243,18 +3243,18 @@ "task": "a16", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "a16", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -3315,18 +3315,18 @@ "task": "a17", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "a17", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -3387,18 +3387,18 @@ "task": "a18", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "a18", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -3459,18 +3459,18 @@ "task": "a19", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "a19", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -3531,18 +3531,18 @@ "task": "a20", "lang": "howl", "encoding": "cl100k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { "task": "a20", "lang": "howl", "encoding": "o200k_base", - "tokens": 347, - "tokens_nocomments": 347, - "bytes": 1066, + "tokens": 186, + "tokens_nocomments": 186, + "bytes": 639, "pass": true }, { @@ -3603,18 +3603,18 @@ "task": "a21", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "a21", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -3675,18 +3675,18 @@ "task": "a22", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "a22", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -3747,18 +3747,18 @@ "task": "a23", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "a23", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -3819,18 +3819,18 @@ "task": "a24", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "a24", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -3891,18 +3891,18 @@ "task": "a25", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "a25", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -3963,18 +3963,18 @@ "task": "a26", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "a26", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -4035,18 +4035,18 @@ "task": "a27", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "a27", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -4107,18 +4107,18 @@ "task": "a28", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "a28", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -4179,18 +4179,18 @@ "task": "a29", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "a29", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { @@ -4251,18 +4251,18 @@ "task": "a30", "lang": "howl", "encoding": "cl100k_base", - "tokens": 124, - "tokens_nocomments": 124, - "bytes": 440, + "tokens": 117, + "tokens_nocomments": 117, + "bytes": 423, "pass": true }, { "task": "a30", "lang": "howl", "encoding": "o200k_base", - "tokens": 123, - "tokens_nocomments": 123, - "bytes": 440, + "tokens": 116, + "tokens_nocomments": 116, + "bytes": 423, "pass": true }, { diff --git a/experiments/token-efficiency-v0/results/verification.json b/experiments/token-efficiency-v0/results/verification.json index 5200de75..23114522 100644 --- a/experiments/token-efficiency-v0/results/verification.json +++ b/experiments/token-efficiency-v0/results/verification.json @@ -3,7 +3,7 @@ "task": "t01", "lang": "howl", "pass": true, - "sha256": "6246759308a83e1b4f647364ce5f80f7e9319a0d953c1f7a71754433c06753e5", + "sha256": "fbfbacd083ef616005a12f2726083463ea4c531344a8e42a13ebd648c2caa422", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -27,7 +27,7 @@ "task": "t02", "lang": "howl", "pass": true, - "sha256": "552045472a7f49debec8816b2dde07dc2cb71aa3b706e4ba298f8d3be00b58d8", + "sha256": "b314283a4ea217a177d5d92a5daa6be0209812f1ec5959f355917cedc5aecdeb", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -51,7 +51,7 @@ "task": "t03", "lang": "howl", "pass": true, - "sha256": "11725e2f076f38f4b06d84e05e019369722f7404d53152d1aa09bcf30f68abcc", + "sha256": "2d63009ee912590b5eb196219fb70ecb9c47045180750e95105240e4db50b51f", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -75,7 +75,7 @@ "task": "t04", "lang": "howl", "pass": true, - "sha256": "5a3fed703db55f13c2482ef237a5d0145baaf0c66debb6f20b012580b681fbd2", + "sha256": "71312b138c76e1ef5cfa74fa026a6614857ab6615c21459745629825536881fd", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -99,7 +99,7 @@ "task": "t05", "lang": "howl", "pass": true, - "sha256": "56f2b8e3465a6b13afbf7144a87045cbaef0c28cfb6450ebe7d51d37964e4331", + "sha256": "8f6ca6e2104d8755aa19573d40f27bdbf15bec801109b6589ddc9bf018d9e1eb", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -123,7 +123,7 @@ "task": "t06", "lang": "howl", "pass": true, - "sha256": "870daa78511205e5cea158490dc9f630ee715392144cf61b85f438e3992c05fb", + "sha256": "5f566cf5df731e9443c09deb4dd7a4004c86d137222514625ca77cdcdb1de0b5", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -147,7 +147,7 @@ "task": "t07", "lang": "howl", "pass": true, - "sha256": "85341ab3fdb2303738e0560f3256fb6ac562e0dfad4522beaedf16ddf8203395", + "sha256": "7ce21e3331a06a2552f3b7bf1a4ef5fbf667116f3e20b735c4c68365ae7e8d02", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -171,7 +171,7 @@ "task": "t08", "lang": "howl", "pass": true, - "sha256": "c14c9c745f38457e1a95728555b14153eb9926dbd9a9b95df0eb10e40c473e02", + "sha256": "55e44afc5b31485b0eb08aacd3b14b063efbc9ee8aaec2d77c3e118e5ce2bf28", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -195,7 +195,7 @@ "task": "t09", "lang": "howl", "pass": true, - "sha256": "5178812f18234d49f3a0649dcb57817ce34a80311bcb40c651a685bb71656005", + "sha256": "e4df09e3c66bf0b0e191ae58d9ea22b2f45726aa0bc9deb2fa1a04a611046a88", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -219,7 +219,7 @@ "task": "t10", "lang": "howl", "pass": true, - "sha256": "ba11e6171ea1458bffa9a315daa0488ac2869bcd4263401861c8acd2c172a128", + "sha256": "13e85deeb253ea3b6a5b0da23884433588da6686ae124d4facc6b6863ca292ed", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -243,7 +243,7 @@ "task": "t11", "lang": "howl", "pass": true, - "sha256": "f81a864df66dfc87a406592ad51cdc31f2d08c682bffe470a70fd8c11eaddaa6", + "sha256": "59ece6d170e93a46a5788cab10e328913835989e4933fe326e47e8cd1949fff5", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -267,7 +267,7 @@ "task": "t12", "lang": "howl", "pass": true, - "sha256": "e68886e92aa4d56e91354820aa658c3b59c675a7acaab8327a2f3413fd5d70bd", + "sha256": "60674b33d71dfbd1dc3a51592f2b2ae883049d4317808647f68b206faf71c5cf", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -291,7 +291,7 @@ "task": "t13", "lang": "howl", "pass": true, - "sha256": "086b9afd15a36bf5642bc0585094f780c7302aebb29c8d91d647c1f74f0696a8", + "sha256": "4e2f1c0a0837474a22a4f990500a806bfb36831b5eda757ba14a46177a0ed237", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -315,7 +315,7 @@ "task": "t14", "lang": "howl", "pass": true, - "sha256": "d2be02cf0e992ae565dca21c8cb73005ab62c4d36468f1fbcbc1aa23da6893cd", + "sha256": "87fb341a85965e4898e968b590170f6a3800b52ebd649c3193b741b14dbefb44", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -339,7 +339,7 @@ "task": "t15", "lang": "howl", "pass": true, - "sha256": "7456f004379d0633235c154911e5701f8930af09c0f347cd292c3c1931c47e4f", + "sha256": "227c44f19c6c6e5cf943a58e8c1c59c3c522d386fdbfb12d83fbb74442f46751", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -363,7 +363,7 @@ "task": "t16", "lang": "howl", "pass": true, - "sha256": "a5e0eb5d4cf19fedd21c5795735c5cdd584364f9079f52411f1218a7725417d1", + "sha256": "e0d7b728e8b4c2b2597789604874584e5ecbdb11f77932bdf47dd0a907598fab", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -387,7 +387,7 @@ "task": "t17", "lang": "howl", "pass": true, - "sha256": "d4ae270a0de47e112f9be6d691e6b178a08166939dc438fcf2b2fbc396cd7975", + "sha256": "97f7722bbfe54dd66c07b706352d6531efda851946ea79f626f7ea7bc5d5ba04", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -411,7 +411,7 @@ "task": "t18", "lang": "howl", "pass": true, - "sha256": "ff1819bc68f3c01fd0a921a4db7c528a5daf561b7f093dadb387b4f514598b1e", + "sha256": "7b7934e41c6a5d14b6091b846c2c5b5f5ffc80030e4886002cad67ea626771c5", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -435,7 +435,7 @@ "task": "t19", "lang": "howl", "pass": true, - "sha256": "8aa82ab5c767f927cceadb190fab2bfa885600b9c94ad76a783f44fbb2097d63", + "sha256": "4b54b075a74072fbff6c13d4a69491d96f5562d906fa96ce706e4486ebe02faf", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -459,7 +459,7 @@ "task": "t20", "lang": "howl", "pass": true, - "sha256": "d1d36e914b4a7d429504a6a16cd7e87317963fb2e18608933acaca860304b2f0", + "sha256": "092bb5379026822f8db9f04e47158644497c00b1bc4a6bc18b7531490eaa499c", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -483,7 +483,7 @@ "task": "t21", "lang": "howl", "pass": true, - "sha256": "91947795f5f2198905c3af47e12be933a981738bb06b904e79ec8124ced392af", + "sha256": "c5b80c87213b51e98d2fa1314d5f9d88207c9953b0fa7ec50007b876b8b9c039", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -507,7 +507,7 @@ "task": "t22", "lang": "howl", "pass": true, - "sha256": "ad8f97d01a0d824f39b2ea3eceddf6849bef04e630d1183c12150502f2e43a1c", + "sha256": "3756d448ce9999c0221a5e64ce61e1189cac6588cd79ccfa50e8e58555b8327e", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -531,7 +531,7 @@ "task": "t23", "lang": "howl", "pass": true, - "sha256": "eaac5da8c0d1e03812a19627fefbbc469d6ff5dbad022f5f7d1c8f0baed5e4c2", + "sha256": "068fd23e3a609011b09fd267c640ae581c45c26e1ff05fa3d03d8c68cb8bc018", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -555,7 +555,7 @@ "task": "t24", "lang": "howl", "pass": true, - "sha256": "15f5c4f907afbefc39fd83fa9acbdea7b713ceded6a2faef3d2b90274c531af2", + "sha256": "b61cb5a6486439774fbb55bdd0c39784e0f0f75d8e03a4c9fe2f4ddb593d0b28", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -579,7 +579,7 @@ "task": "t25", "lang": "howl", "pass": true, - "sha256": "9d1bc994c5d34c28450470a47de0785510dd2134381d4e0050560aa63c28514c", + "sha256": "f534a6539280410fce866c79304d926d515c4f97ef2b611166eab31484034822", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -603,7 +603,7 @@ "task": "t26", "lang": "howl", "pass": true, - "sha256": "80ea5b9a5e78aaa3e97afb30a509d62ca4830cc972f9fe72c09706693b7cce61", + "sha256": "12b40aa0e5fa98a3c119328c330ec891a770383236d9010f8b072ac872a49696", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -627,7 +627,7 @@ "task": "t27", "lang": "howl", "pass": true, - "sha256": "1450a387d929e7256ebbb2de4dea83e1a78cb12439b74c6d3a78640bd20943b4", + "sha256": "ec84785dc8a12c55e91c42886f29cb960b5493c6e45a654a30e3ddcdad1ed835", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -651,7 +651,7 @@ "task": "t28", "lang": "howl", "pass": true, - "sha256": "5868aa9c14236e05ba222e2bf4ecd060df0e2765fceb6323c12762af62057314", + "sha256": "6c3aff0a89902fbb3a11706752cb1ad1ef2371927c08a23ae03d9fcb7a97c395", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -675,7 +675,7 @@ "task": "t29", "lang": "howl", "pass": true, - "sha256": "dda0be2d5ee7feb9aadd1aa41b94a336179f73e87885e6cd42b07c8db1c144f8", + "sha256": "2600d74f0235da495d6bde320a47a5690b2043a8eedae566d3813904084a3e95", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -699,7 +699,7 @@ "task": "t30", "lang": "howl", "pass": true, - "sha256": "f454d603990b866ddf7ab92cf5686cc4d3f2af7665fbe541babf8c8c8fc2820f", + "sha256": "fbc392a9113f59c2800532eeb35b6a354d03d3be1138df49f6b9fb7e1d19bbbd", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -723,7 +723,7 @@ "task": "a01", "lang": "howl", "pass": true, - "sha256": "6246759308a83e1b4f647364ce5f80f7e9319a0d953c1f7a71754433c06753e5", + "sha256": "fbfbacd083ef616005a12f2726083463ea4c531344a8e42a13ebd648c2caa422", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -747,7 +747,7 @@ "task": "a02", "lang": "howl", "pass": true, - "sha256": "552045472a7f49debec8816b2dde07dc2cb71aa3b706e4ba298f8d3be00b58d8", + "sha256": "b314283a4ea217a177d5d92a5daa6be0209812f1ec5959f355917cedc5aecdeb", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -771,7 +771,7 @@ "task": "a03", "lang": "howl", "pass": true, - "sha256": "11725e2f076f38f4b06d84e05e019369722f7404d53152d1aa09bcf30f68abcc", + "sha256": "2d63009ee912590b5eb196219fb70ecb9c47045180750e95105240e4db50b51f", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -795,7 +795,7 @@ "task": "a04", "lang": "howl", "pass": true, - "sha256": "5a3fed703db55f13c2482ef237a5d0145baaf0c66debb6f20b012580b681fbd2", + "sha256": "71312b138c76e1ef5cfa74fa026a6614857ab6615c21459745629825536881fd", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -819,7 +819,7 @@ "task": "a05", "lang": "howl", "pass": true, - "sha256": "56f2b8e3465a6b13afbf7144a87045cbaef0c28cfb6450ebe7d51d37964e4331", + "sha256": "8f6ca6e2104d8755aa19573d40f27bdbf15bec801109b6589ddc9bf018d9e1eb", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -843,7 +843,7 @@ "task": "a06", "lang": "howl", "pass": true, - "sha256": "870daa78511205e5cea158490dc9f630ee715392144cf61b85f438e3992c05fb", + "sha256": "5f566cf5df731e9443c09deb4dd7a4004c86d137222514625ca77cdcdb1de0b5", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -867,7 +867,7 @@ "task": "a07", "lang": "howl", "pass": true, - "sha256": "85341ab3fdb2303738e0560f3256fb6ac562e0dfad4522beaedf16ddf8203395", + "sha256": "7ce21e3331a06a2552f3b7bf1a4ef5fbf667116f3e20b735c4c68365ae7e8d02", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -891,7 +891,7 @@ "task": "a08", "lang": "howl", "pass": true, - "sha256": "c14c9c745f38457e1a95728555b14153eb9926dbd9a9b95df0eb10e40c473e02", + "sha256": "55e44afc5b31485b0eb08aacd3b14b063efbc9ee8aaec2d77c3e118e5ce2bf28", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -915,7 +915,7 @@ "task": "a09", "lang": "howl", "pass": true, - "sha256": "5178812f18234d49f3a0649dcb57817ce34a80311bcb40c651a685bb71656005", + "sha256": "e4df09e3c66bf0b0e191ae58d9ea22b2f45726aa0bc9deb2fa1a04a611046a88", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -939,7 +939,7 @@ "task": "a10", "lang": "howl", "pass": true, - "sha256": "ba11e6171ea1458bffa9a315daa0488ac2869bcd4263401861c8acd2c172a128", + "sha256": "13e85deeb253ea3b6a5b0da23884433588da6686ae124d4facc6b6863ca292ed", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -963,7 +963,7 @@ "task": "a11", "lang": "howl", "pass": true, - "sha256": "f81a864df66dfc87a406592ad51cdc31f2d08c682bffe470a70fd8c11eaddaa6", + "sha256": "59ece6d170e93a46a5788cab10e328913835989e4933fe326e47e8cd1949fff5", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -987,7 +987,7 @@ "task": "a12", "lang": "howl", "pass": true, - "sha256": "e68886e92aa4d56e91354820aa658c3b59c675a7acaab8327a2f3413fd5d70bd", + "sha256": "60674b33d71dfbd1dc3a51592f2b2ae883049d4317808647f68b206faf71c5cf", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1011,7 +1011,7 @@ "task": "a13", "lang": "howl", "pass": true, - "sha256": "086b9afd15a36bf5642bc0585094f780c7302aebb29c8d91d647c1f74f0696a8", + "sha256": "4e2f1c0a0837474a22a4f990500a806bfb36831b5eda757ba14a46177a0ed237", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1035,7 +1035,7 @@ "task": "a14", "lang": "howl", "pass": true, - "sha256": "d2be02cf0e992ae565dca21c8cb73005ab62c4d36468f1fbcbc1aa23da6893cd", + "sha256": "87fb341a85965e4898e968b590170f6a3800b52ebd649c3193b741b14dbefb44", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1059,7 +1059,7 @@ "task": "a15", "lang": "howl", "pass": true, - "sha256": "7456f004379d0633235c154911e5701f8930af09c0f347cd292c3c1931c47e4f", + "sha256": "227c44f19c6c6e5cf943a58e8c1c59c3c522d386fdbfb12d83fbb74442f46751", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1083,7 +1083,7 @@ "task": "a16", "lang": "howl", "pass": true, - "sha256": "a5e0eb5d4cf19fedd21c5795735c5cdd584364f9079f52411f1218a7725417d1", + "sha256": "e0d7b728e8b4c2b2597789604874584e5ecbdb11f77932bdf47dd0a907598fab", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1107,7 +1107,7 @@ "task": "a17", "lang": "howl", "pass": true, - "sha256": "d4ae270a0de47e112f9be6d691e6b178a08166939dc438fcf2b2fbc396cd7975", + "sha256": "97f7722bbfe54dd66c07b706352d6531efda851946ea79f626f7ea7bc5d5ba04", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1131,7 +1131,7 @@ "task": "a18", "lang": "howl", "pass": true, - "sha256": "ff1819bc68f3c01fd0a921a4db7c528a5daf561b7f093dadb387b4f514598b1e", + "sha256": "7b7934e41c6a5d14b6091b846c2c5b5f5ffc80030e4886002cad67ea626771c5", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1155,7 +1155,7 @@ "task": "a19", "lang": "howl", "pass": true, - "sha256": "8aa82ab5c767f927cceadb190fab2bfa885600b9c94ad76a783f44fbb2097d63", + "sha256": "4b54b075a74072fbff6c13d4a69491d96f5562d906fa96ce706e4486ebe02faf", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1179,7 +1179,7 @@ "task": "a20", "lang": "howl", "pass": true, - "sha256": "d1d36e914b4a7d429504a6a16cd7e87317963fb2e18608933acaca860304b2f0", + "sha256": "092bb5379026822f8db9f04e47158644497c00b1bc4a6bc18b7531490eaa499c", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1203,7 +1203,7 @@ "task": "a21", "lang": "howl", "pass": true, - "sha256": "91947795f5f2198905c3af47e12be933a981738bb06b904e79ec8124ced392af", + "sha256": "c5b80c87213b51e98d2fa1314d5f9d88207c9953b0fa7ec50007b876b8b9c039", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1227,7 +1227,7 @@ "task": "a22", "lang": "howl", "pass": true, - "sha256": "ad8f97d01a0d824f39b2ea3eceddf6849bef04e630d1183c12150502f2e43a1c", + "sha256": "3756d448ce9999c0221a5e64ce61e1189cac6588cd79ccfa50e8e58555b8327e", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1251,7 +1251,7 @@ "task": "a23", "lang": "howl", "pass": true, - "sha256": "eaac5da8c0d1e03812a19627fefbbc469d6ff5dbad022f5f7d1c8f0baed5e4c2", + "sha256": "068fd23e3a609011b09fd267c640ae581c45c26e1ff05fa3d03d8c68cb8bc018", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1275,7 +1275,7 @@ "task": "a24", "lang": "howl", "pass": true, - "sha256": "15f5c4f907afbefc39fd83fa9acbdea7b713ceded6a2faef3d2b90274c531af2", + "sha256": "b61cb5a6486439774fbb55bdd0c39784e0f0f75d8e03a4c9fe2f4ddb593d0b28", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1299,7 +1299,7 @@ "task": "a25", "lang": "howl", "pass": true, - "sha256": "9d1bc994c5d34c28450470a47de0785510dd2134381d4e0050560aa63c28514c", + "sha256": "f534a6539280410fce866c79304d926d515c4f97ef2b611166eab31484034822", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1323,7 +1323,7 @@ "task": "a26", "lang": "howl", "pass": true, - "sha256": "80ea5b9a5e78aaa3e97afb30a509d62ca4830cc972f9fe72c09706693b7cce61", + "sha256": "12b40aa0e5fa98a3c119328c330ec891a770383236d9010f8b072ac872a49696", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1347,7 +1347,7 @@ "task": "a27", "lang": "howl", "pass": true, - "sha256": "1450a387d929e7256ebbb2de4dea83e1a78cb12439b74c6d3a78640bd20943b4", + "sha256": "ec84785dc8a12c55e91c42886f29cb960b5493c6e45a654a30e3ddcdad1ed835", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1371,7 +1371,7 @@ "task": "a28", "lang": "howl", "pass": true, - "sha256": "5868aa9c14236e05ba222e2bf4ecd060df0e2765fceb6323c12762af62057314", + "sha256": "6c3aff0a89902fbb3a11706752cb1ad1ef2371927c08a23ae03d9fcb7a97c395", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1395,7 +1395,7 @@ "task": "a29", "lang": "howl", "pass": true, - "sha256": "dda0be2d5ee7feb9aadd1aa41b94a336179f73e87885e6cd42b07c8db1c144f8", + "sha256": "2600d74f0235da495d6bde320a47a5690b2043a8eedae566d3813904084a3e95", "diagnostics": "[]", "comparison": { "status": "evaluated", @@ -1419,7 +1419,7 @@ "task": "a30", "lang": "howl", "pass": true, - "sha256": "f454d603990b866ddf7ab92cf5686cc4d3f2af7665fbe541babf8c8c8fc2820f", + "sha256": "fbc392a9113f59c2800532eeb35b6a354d03d3be1138df49f6b9fb7e1d19bbbd", "diagnostics": "[]", "comparison": { "status": "evaluated", diff --git a/experiments/token-efficiency-v0/solutions/howl/a01.howl b/experiments/token-efficiency-v0/solutions/howl/a01.howl index 8718d091..2bb63071 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a01.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a01.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "01") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "01") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a02.howl b/experiments/token-efficiency-v0/solutions/howl/a02.howl index c8525d16..08ed62db 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a02.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a02.howl @@ -1,17 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len selected) (list_len checks)) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "02") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "02") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a03.howl b/experiments/token-efficiency-v0/solutions/howl/a03.howl index f240126d..cd9105e6 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a03.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a03.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "03") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "03") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a04.howl b/experiments/token-efficiency-v0/solutions/howl/a04.howl index 33614d29..8b85b2d5 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a04.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a04.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "04") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "04") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a05.howl b/experiments/token-efficiency-v0/solutions/howl/a05.howl index 35e83040..95ec4b78 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a05.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a05.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "05") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "05") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a06.howl b/experiments/token-efficiency-v0/solutions/howl/a06.howl index 919ebd85..4daf8bd4 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a06.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a06.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "06") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "06") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a07.howl b/experiments/token-efficiency-v0/solutions/howl/a07.howl index 661352f2..3c42786e 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a07.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a07.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "07") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "07") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a08.howl b/experiments/token-efficiency-v0/solutions/howl/a08.howl index ae165cb1..30002c00 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a08.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a08.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "08") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "08") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a09.howl b/experiments/token-efficiency-v0/solutions/howl/a09.howl index 56f34f2b..6531e25b 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a09.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a09.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "09") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "09") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a10.howl b/experiments/token-efficiency-v0/solutions/howl/a10.howl index 16b05fa0..99278e08 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a10.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a10.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "10") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "10") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a11.howl b/experiments/token-efficiency-v0/solutions/howl/a11.howl index 063e747a..d7620b4d 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a11.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a11.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "11") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "11") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a12.howl b/experiments/token-efficiency-v0/solutions/howl/a12.howl index d78150b1..de5c427b 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a12.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a12.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "12") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "12") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a13.howl b/experiments/token-efficiency-v0/solutions/howl/a13.howl index 8a176b43..9c3ac432 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a13.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a13.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "13") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "13") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a14.howl b/experiments/token-efficiency-v0/solutions/howl/a14.howl index 60ea68da..b8886369 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a14.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a14.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "14") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "14") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a15.howl b/experiments/token-efficiency-v0/solutions/howl/a15.howl index 7e7c3ff9..24e1200f 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a15.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a15.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "15") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "15") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a16.howl b/experiments/token-efficiency-v0/solutions/howl/a16.howl index ac56e5db..872146b8 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a16.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a16.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "16") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "16") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a17.howl b/experiments/token-efficiency-v0/solutions/howl/a17.howl index d7147d47..9591e83b 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a17.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a17.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "17") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "17") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a18.howl b/experiments/token-efficiency-v0/solutions/howl/a18.howl index d9bf0193..ce060743 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a18.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a18.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "18") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "18") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a19.howl b/experiments/token-efficiency-v0/solutions/howl/a19.howl index 17fbfe99..45b93f0c 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a19.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a19.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "19") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "19") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a20.howl b/experiments/token-efficiency-v0/solutions/howl/a20.howl index 4bf3f5a7..d3ca84b5 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a20.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a20.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "20") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "20") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a21.howl b/experiments/token-efficiency-v0/solutions/howl/a21.howl index 400fa2df..1aa0622a 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a21.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a21.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "21") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "21") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a22.howl b/experiments/token-efficiency-v0/solutions/howl/a22.howl index 9285a7ce..0252ceeb 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a22.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a22.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "22") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "22") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a23.howl b/experiments/token-efficiency-v0/solutions/howl/a23.howl index eca2ae34..4da6fbf7 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a23.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a23.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "23") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "23") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a24.howl b/experiments/token-efficiency-v0/solutions/howl/a24.howl index eb132b39..3f703e46 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a24.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a24.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "24") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "24") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a25.howl b/experiments/token-efficiency-v0/solutions/howl/a25.howl index b8a987f2..00c0d35d 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a25.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a25.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "25") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "25") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a26.howl b/experiments/token-efficiency-v0/solutions/howl/a26.howl index 09a9c5f5..9336d249 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a26.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a26.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "26") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "26") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a27.howl b/experiments/token-efficiency-v0/solutions/howl/a27.howl index 451bc8bd..277bda4a 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a27.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a27.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "27") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "27") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a28.howl b/experiments/token-efficiency-v0/solutions/howl/a28.howl index 1a0c338e..999f94e8 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a28.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a28.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "28") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "28") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a29.howl b/experiments/token-efficiency-v0/solutions/howl/a29.howl index ba622e67..8977710c 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a29.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a29.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "29") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "29") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/a30.howl b/experiments/token-efficiency-v0/solutions/howl/a30.howl index 52e0f023..399805be 100644 --- a/experiments/token-efficiency-v0/solutions/howl/a30.howl +++ b/experiments/token-efficiency-v0/solutions/howl/a30.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "30") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "30") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t01.howl b/experiments/token-efficiency-v0/solutions/howl/t01.howl index 8718d091..2bb63071 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t01.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t01.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "01") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "01") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t02.howl b/experiments/token-efficiency-v0/solutions/howl/t02.howl index c8525d16..08ed62db 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t02.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t02.howl @@ -1,17 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len selected) (list_len checks)) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "02") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "02") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t03.howl b/experiments/token-efficiency-v0/solutions/howl/t03.howl index f240126d..cd9105e6 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t03.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t03.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "03") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "03") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t04.howl b/experiments/token-efficiency-v0/solutions/howl/t04.howl index 33614d29..8b85b2d5 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t04.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t04.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "04") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "04") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t05.howl b/experiments/token-efficiency-v0/solutions/howl/t05.howl index 35e83040..95ec4b78 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t05.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t05.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "05") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "05") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t06.howl b/experiments/token-efficiency-v0/solutions/howl/t06.howl index 919ebd85..4daf8bd4 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t06.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t06.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "06") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "06") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t07.howl b/experiments/token-efficiency-v0/solutions/howl/t07.howl index 661352f2..3c42786e 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t07.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t07.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "07") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "07") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t08.howl b/experiments/token-efficiency-v0/solutions/howl/t08.howl index ae165cb1..30002c00 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t08.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t08.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "08") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "08") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t09.howl b/experiments/token-efficiency-v0/solutions/howl/t09.howl index 56f34f2b..6531e25b 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t09.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t09.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "09") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "09") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t10.howl b/experiments/token-efficiency-v0/solutions/howl/t10.howl index 16b05fa0..99278e08 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t10.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t10.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "status") "PASS") (append selected c))) - (write_file "out/release.json" (encode_json (dict ("batch" "10") ("selected" selected)))))))) + (write_file "out/release.json" (encode_json (dict ("batch" "10") ("selected" selected))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t11.howl b/experiments/token-efficiency-v0/solutions/howl/t11.howl index 063e747a..d7620b4d 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t11.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t11.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "11") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "11") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t12.howl b/experiments/token-efficiency-v0/solutions/howl/t12.howl index d78150b1..de5c427b 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t12.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t12.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "12") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "12") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t13.howl b/experiments/token-efficiency-v0/solutions/howl/t13.howl index 8a176b43..9c3ac432 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t13.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t13.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "13") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "13") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t14.howl b/experiments/token-efficiency-v0/solutions/howl/t14.howl index 60ea68da..b8886369 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t14.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t14.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "14") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "14") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t15.howl b/experiments/token-efficiency-v0/solutions/howl/t15.howl index 7e7c3ff9..24e1200f 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t15.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t15.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "15") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "15") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t16.howl b/experiments/token-efficiency-v0/solutions/howl/t16.howl index ac56e5db..872146b8 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t16.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t16.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "16") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "16") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t17.howl b/experiments/token-efficiency-v0/solutions/howl/t17.howl index d7147d47..9591e83b 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t17.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t17.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "17") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "17") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t18.howl b/experiments/token-efficiency-v0/solutions/howl/t18.howl index d9bf0193..ce060743 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t18.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t18.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "18") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "18") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t19.howl b/experiments/token-efficiency-v0/solutions/howl/t19.howl index 17fbfe99..45b93f0c 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t19.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t19.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "19") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "19") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t20.howl b/experiments/token-efficiency-v0/solutions/howl/t20.howl index 4bf3f5a7..d3ca84b5 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t20.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t20.howl @@ -1,19 +1,11 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) lines (lines (read_file "evidence/version.kv")) note (read_text "evidence/note.txt") - selected (list) - failed (list)) + selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (for c checks (when (!= (map_get c "status") "PASS") (append failed c))) - (let (cp (str_split (list_get lines 0) "=") - pp (str_split (list_get lines 1) "=") - cur (str_split (list_get cp 1) ".") - pro (str_split (list_get pp 1) ".") - c0 (to_int (list_get cur 0)) c1 (to_int (list_get cur 1)) c2 (to_int (list_get cur 2)) - p0 (to_int (list_get pro 0)) p1 (to_int (list_get pro 1)) p2 (to_int (list_get pro 2))) - (if (and (= (list_len failed) 0) (or (> p0 c0) (and (= p0 c0) (or (> p1 c1) (and (= p1 c1) (> p2 c2)))))) - (write_file "out/release.json" (encode_json (dict ("batch" "20") ("selected" selected)))) - (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))))) + (if (and (all c checks (= (map_get c "status") "PASS")) + (ver_gt (list_get (str_split (list_get lines 1) "=") 1) (list_get (str_split (list_get lines 0) "=") 1))) + (write_file "out/release.json" (encode_json (dict ("batch" "20") ("selected" selected)))) + (write_file "out/approval_request.json" "{\"reason\":\"blocked\",\"summary\":{}}"))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t21.howl b/experiments/token-efficiency-v0/solutions/howl/t21.howl index 400fa2df..1aa0622a 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t21.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t21.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "21") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "21") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t22.howl b/experiments/token-efficiency-v0/solutions/howl/t22.howl index 9285a7ce..0252ceeb 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t22.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t22.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "22") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "22") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t23.howl b/experiments/token-efficiency-v0/solutions/howl/t23.howl index eca2ae34..4da6fbf7 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t23.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t23.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "23") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "23") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t24.howl b/experiments/token-efficiency-v0/solutions/howl/t24.howl index eb132b39..3f703e46 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t24.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t24.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "24") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "24") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t25.howl b/experiments/token-efficiency-v0/solutions/howl/t25.howl index b8a987f2..00c0d35d 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t25.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t25.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "25") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "25") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t26.howl b/experiments/token-efficiency-v0/solutions/howl/t26.howl index 09a9c5f5..9336d249 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t26.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t26.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "26") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "26") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t27.howl b/experiments/token-efficiency-v0/solutions/howl/t27.howl index 451bc8bd..277bda4a 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t27.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t27.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "27") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "27") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t28.howl b/experiments/token-efficiency-v0/solutions/howl/t28.howl index 1a0c338e..999f94e8 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t28.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t28.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "28") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "28") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t29.howl b/experiments/token-efficiency-v0/solutions/howl/t29.howl index ba622e67..8977710c 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t29.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t29.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "29") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "29") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions/howl/t30.howl b/experiments/token-efficiency-v0/solutions/howl/t30.howl index 52e0f023..399805be 100644 --- a/experiments/token-efficiency-v0/solutions/howl/t30.howl +++ b/experiments/token-efficiency-v0/solutions/howl/t30.howl @@ -1,9 +1,8 @@ (do - (let (raw (read_text "evidence/checks.json")) - (let (checks (parse_json Checks raw) + (let (checks (parse_json Checks (read_text "evidence/checks.json")) version (read_text "evidence/version.kv") note (read_text "evidence/note.txt") selected (list)) (do (for c checks (when (= (map_get c "name") "unit") (append selected c))) - (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "30") ("selected" selected)))))))))) + (write_file "out/approval_request.json" (encode_json (dict ("reason" "release review") ("summary" (dict ("batch" "30") ("selected" selected))))))))) diff --git a/experiments/token-efficiency-v0/solutions_test.go b/experiments/token-efficiency-v0/solutions_test.go index d2e2f801..49b860ed 100644 --- a/experiments/token-efficiency-v0/solutions_test.go +++ b/experiments/token-efficiency-v0/solutions_test.go @@ -23,7 +23,7 @@ func TestSolutionCoverage(t *testing.T) { } } // HowlFrame references were re-authored in current shorthand on 2026-10-12 - // (rerun after #128-#130); they intentionally no longer copy reference/arm_a + // (#134; sugar from #117, #118, #120, #124; compact built-ins later); they intentionally no longer copy reference/arm_a // verbatim. Guard against regressing to the expanded pre-shorthand forms. for _, task := range m.All() { data, err := os.ReadFile(filepath.Join("solutions/howl", task.ID+".howl")) diff --git a/experiments/token-efficiency-v0/verification_test.go b/experiments/token-efficiency-v0/verification_test.go new file mode 100644 index 00000000..63545935 --- /dev/null +++ b/experiments/token-efficiency-v0/verification_test.go @@ -0,0 +1,70 @@ +package tokenefficiency + +import ( + "crypto/sha256" + "encoding/json" + "fmt" + "os" + "path/filepath" + "testing" + + "github.com/howlcipher/howlframe/experiments/falsifiable-v0/harness" +) + +// results/verification.json must cover every task × language exactly once, +// every entry must pass, and each recorded hash must match the committed source. +func TestVerificationResultsCoverAndMatchSources(t *testing.T) { + m, err := harness.LoadManifest("../falsifiable-v0") + if err != nil { + t.Fatal(err) + } + data, err := os.ReadFile("results/verification.json") + if err != nil { + t.Fatal(err) + } + var results []struct { + Task string `json:"task"` + Lang string `json:"lang"` + Pass bool `json:"pass"` + SHA256 string `json:"sha256"` + } + if err := json.Unmarshal(data, &results); err != nil { + t.Fatal(err) + } + ext := map[string]string{"howl": "howl", "python": "py", "js": "js", "go": "go"} + seen := map[string]bool{} + for _, r := range results { + key := r.Task + "/" + r.Lang + if seen[key] { + t.Errorf("duplicate entry %s", key) + } + seen[key] = true + if !r.Pass { + t.Errorf("%s did not pass", key) + } + e, ok := ext[r.Lang] + if !ok { + t.Errorf("unknown lang %s", key) + continue + } + src, err := os.ReadFile(filepath.Join("solutions", r.Lang, r.Task+"."+e)) + if err != nil { + t.Errorf("%s: %v", key, err) + continue + } + if got := fmt.Sprintf("%x", sha256.Sum256(src)); got != r.SHA256 { + t.Errorf("%s: stale hash %s, source is %s", key, r.SHA256, got) + } + } + tasks := m.All() + if want := len(tasks) * len(ext); len(results) != want || want != 240 { + t.Errorf("verification has %d entries, want %d (60 tasks × 4 languages)", len(results), want) + } + for _, task := range tasks { + for lang := range ext { + if !seen[task.ID+"/"+lang] { + t.Errorf("missing %s/%s", task.ID, lang) + } + } + } +} diff --git a/internal/ast/desugar.go b/internal/ast/desugar.go index 79369df4..6a7f12c6 100644 --- a/internal/ast/desugar.go +++ b/internal/ast/desugar.go @@ -211,6 +211,26 @@ func desugarInContext(node *Node, parentHead string, childIndex int) { if isSugarExprContext(parentHead, childIndex) { desugarUnixNow(node) } + case "ver_gt", "ver_ge": + if isSugarExprContext(parentHead, childIndex) { + desugarVersionCompare(node, head == "ver_ge") + desugarInContext(node, parentHead, childIndex) + } + case "all", "any": + if isSugarExprContext(parentHead, childIndex) { + desugarAllAny(node, head == "all") + desugarInContext(node, parentHead, childIndex) + } + case "list_get": + // A literal (list …) operand is left alone: backends such as wasm + // lower it directly and do not support let. + if isSugarExprContext(parentHead, childIndex) && !isListLiteral(node, 1) && desugarBindOperand(node, 1, "lg") { + desugarInContext(node, parentHead, childIndex) + } + case "parse_json": + if isSugarExprContext(parentHead, childIndex) && desugarBindOperand(node, 2, "pj") { + desugarInContext(node, parentHead, childIndex) + } } } @@ -228,7 +248,7 @@ func isSugarExprContext(parentHead string, childIndex int) bool { "switch", "inc", "dec", "str", "nz", "map_has", "when", "unless", "str_contains", "str_replace", "starts_with", "ends_with", "http_body", "http_status", "http_res", "list_contains", "not", - "blank", "unix_now": + "blank", "unix_now", "ver_gt", "ver_ge", "all", "any", "parse_json", "list_len": return true case "for": return childIndex == 2 || childIndex == 3 @@ -326,7 +346,7 @@ var reservedCallHeads = map[string]bool{ "switch": true, "inc": true, "dec": true, "str": true, "nz": true, "map_has": true, "when": true, "unless": true, "str_contains": true, "str_replace": true, "starts_with": true, "ends_with": true, "http_body": true, "http_status": true, "http_res": true, "list_contains": true, "not": true, - "blank": true, "unix_now": true, + "blank": true, "unix_now": true, "ver_gt": true, "ver_ge": true, "all": true, "any": true, "parse_json": true, "dict": true, "exit": true, "for": true, "if": true, "let": true, "list": true, "print": true, "return": true, "set": true, "stderr": true, "to_lower": true, "to_upper": true, "str_trim": true, diff --git a/internal/ast/desugar_compact.go b/internal/ast/desugar_compact.go new file mode 100644 index 00000000..9bb303b5 --- /dev/null +++ b/internal/ast/desugar_compact.go @@ -0,0 +1,170 @@ +package ast + +import ( + "fmt" + "strings" + "sync/atomic" +) + +// Compact-conditional density sugar. Every form here expands into existing, +// already-lowered constructs (let, for, when, not, str_split, to_int, list_get, +// comparisons), so it adds no opcode, capability or effect: +// +// - (ver_gt a b) / (ver_ge a b): strict numeric x.y.z comparison of two +// version strings (a > b, a >= b), lexicographic over major/minor/patch. +// - (all x lst pred) / (any x lst pred): bind each element of lst to x and +// test pred; all is true for an empty list, any is false. +// - (list_get i): a non-symbol list operand is bound to a fresh +// temporary first, since the lowering reads a variable name. +// - (parse_json T ): likewise binds a non-symbol text operand. + +var compactGensym atomic.Uint64 + +func compactTemp(prefix string) string { + return fmt.Sprintf("__%s%d", prefix, compactGensym.Add(1)) +} + +// buildTemplate parses a small s-expression template. Tokens of the form $name +// are replaced by args[name]; each placeholder may appear at most once per +// argument node supplied (callers bind values to temporaries first). Template +// strings never contain spaces or escapes. +func buildTemplate(src string, args map[string]*Node, at *Node) *Node { + toks := strings.Fields(strings.NewReplacer("(", " ( ", ")", " ) ").Replace(src)) + pos := 0 + mk := func(typ, val string) *Node { + return &Node{Type: typ, Value: val, Line: at.Line, Column: at.Column, Filename: at.Filename} + } + var parse func() *Node + parse = func() *Node { + t := toks[pos] + pos++ + if t == "(" { + n := mk("List", "") + for toks[pos] != ")" { + n.Children = append(n.Children, parse()) + } + pos++ + return n + } + if strings.HasPrefix(t, "$") { + if a, ok := args[t[1:]]; ok { + return a + } + panic("buildTemplate: missing arg " + t) + } + if strings.HasPrefix(t, "\"") { + return mk("STRING", strings.Trim(t, "\"")) + } + if t[0] >= '0' && t[0] <= '9' { + return mk("INT", t) + } + return mk("SYMBOL", t) + } + return parse() +} + +func symNode(name string, at *Node) *Node { + return &Node{Type: "SYMBOL", Value: name, Line: at.Line, Column: at.Column, Filename: at.Filename} +} + +func desugarVersionCompare(node *Node, orEqual bool) { + if len(node.Children) != 3 { + ReportError(node.Children[0].Value+" expects ("+node.Children[0].Value+" a b) over x.y.z strings", node.Line, node.Column) + return + } + args := map[string]*Node{"a": node.Children[1], "b": node.Children[2]} + names := []string{"A", "B", "a0", "a1", "a2", "b0", "b1", "b2"} + for _, n := range names { + args[n] = symNode(compactTemp("v"+n), node) + } + // Each temp symbol node is referenced multiple times below; give each + // occurrence its own node so the tree stays a tree. + ref := map[string]int{} + tpl := "(let ($A (str_split $a \".\") $B (str_split $b \".\")" + + " $a0 (to_int (list_get $A 0)) $a1 (to_int (list_get $A 1)) $a2 (to_int (list_get $A 2))" + + " $b0 (to_int (list_get $B 0)) $b1 (to_int (list_get $B 1)) $b2 (to_int (list_get $B 2)))" + + " (or (> $a0 $b0) (and (= $a0 $b0) (or (> $a1 $b1) (and (= $a1 $b1) (LAST $a2 $b2))))))" + last := ">" + if orEqual { + last = ">=" + } + tpl = strings.Replace(tpl, "LAST", last, 1) + expanded := buildTemplateFresh(tpl, args, ref, node) + node.Children = expanded.Children +} + +// buildTemplateFresh is buildTemplate but clones SYMBOL placeholders on every +// use after the first, so temporaries can be referenced repeatedly. +func buildTemplateFresh(src string, args map[string]*Node, _ map[string]int, at *Node) *Node { + used := map[string]bool{} + wrapped := map[string]*Node{} + for k, v := range args { + wrapped[k] = v + } + toks := strings.Fields(strings.NewReplacer("(", " ( ", ")", " ) ").Replace(src)) + for i, t := range toks { + if strings.HasPrefix(t, "$") { + k := t[1:] + if used[k] { + a := args[k] + if a.Type != "SYMBOL" { + panic("buildTemplateFresh: non-symbol placeholder reused: " + k) + } + alias := fmt.Sprintf("%s#%d", k, i) + wrapped[alias] = symNode(a.Value, at) + toks[i] = "$" + alias + } + used[k] = true + } + } + return buildTemplate(strings.Join(toks, " "), wrapped, at) +} + +func desugarAllAny(node *Node, isAll bool) { + head := node.Children[0].Value + if len(node.Children) != 4 || node.Children[1].Type != "SYMBOL" { + ReportError(head+" expects ("+head+" var list predicate)", node.Line, node.Column) + return + } + args := map[string]*Node{ + "x": node.Children[1], + "lst": node.Children[2], + "pred": node.Children[3], + "L": symNode(compactTemp("ql"), node), + "F": symNode(compactTemp("qf"), node), + } + var tpl string + if isAll { + tpl = "(let ($L $lst $F 1) (do (for $x $L (when (not $pred) (set $F 0))) (= $F 1)))" + } else { + tpl = "(let ($L $lst $F 0) (do (for $x $L (when $pred (set $F 1))) (= $F 1)))" + } + node.Children = buildTemplateFresh(tpl, args, nil, node).Children +} + +// desugarBindOperand rewrites (head ... ...) into +// (let (__t ) (head ... __t ...)) when the operand is not a symbol. +func desugarBindOperand(node *Node, idx int, prefix string) bool { + if len(node.Children) <= idx || node.Children[idx] == nil || node.Children[idx].Type != "List" { + return false + } + tmp := compactTemp(prefix) + inner := &Node{Type: "List", Line: node.Line, Column: node.Column, Filename: node.Filename} + inner.Children = append(inner.Children, node.Children...) + operand := inner.Children[idx] + inner.Children[idx] = symNode(tmp, node) + node.Children = []*Node{ + symNode("let", node), + {Type: "List", Line: node.Line, Column: node.Column, Filename: node.Filename, Children: []*Node{symNode(tmp, node), operand}}, + inner, + } + return true +} + +func isListLiteral(node *Node, idx int) bool { + if len(node.Children) <= idx { + return false + } + op := node.Children[idx] + return op != nil && op.Type == "List" && len(op.Children) > 0 && op.Children[0].Type == "SYMBOL" && op.Children[0].Value == "list" +} diff --git a/internal/ast/desugar_compact_test.go b/internal/ast/desugar_compact_test.go new file mode 100644 index 00000000..3c5b4113 --- /dev/null +++ b/internal/ast/desugar_compact_test.go @@ -0,0 +1,69 @@ +package ast_test + +import ( + "strings" + "testing" + + "github.com/howlcipher/howlframe/internal/ast" +) + +// pureHeads is the closed set of construct heads compact-conditional sugar may +// expand into. None of them reads, writes, spawns, fetches or otherwise needs a +// capability; any new head appearing in an expansion fails this test. +var pureHeads = map[string]bool{ + "let": true, "do": true, "for": true, "if": true, "set": true, + "str_split": true, "to_int": true, "list_get": true, "parse_json": true, + "or": true, "and": true, "=": true, ">": true, ">=": true, +} + +func collectHeads(n *ast.Node, out map[string]bool) { + if n == nil || n.Type != "List" || len(n.Children) == 0 { + return + } + // Temporaries (__name) head binding lists, not construct calls. + if h := n.Children[0]; h.Type == "SYMBOL" && !strings.HasPrefix(h.Value, "__") { + out[h.Value] = true + } + for _, c := range n.Children { + collectHeads(c, out) + } +} + +func TestCompactConditionalSugarExpandsOnlyToPureConstructs(t *testing.T) { + cases := map[string]string{ + "ver_gt": `(cli_app (print (ver_gt "1.2.3" "1.2.0")))`, + "ver_ge": `(cli_app (print (ver_ge v w)))`, + "all": `(cli_app (print (all x xs (= x 1))))`, + "any": `(cli_app (print (any x xs (> x 1))))`, + "list_get_expr": `(cli_app (print (list_get (str_split s ".") 1)))`, + "parse_json_expr": `(cli_app (print (parse_json T (str_split s "."))))`, + "nested_all_inner": `(cli_app (print (all x xs (any y ys (= x y)))))`, + } + for name, src := range cases { + t.Run(name, func(t *testing.T) { + root := parseDesugar(t, src) + heads := map[string]bool{} + collectHeads(root.Children[1].Children[1], heads) + for h := range heads { + if !pureHeads[h] { + t.Errorf("expansion contains non-pure or unexpected head %q", h) + } + } + for _, sugar := range []string{"ver_gt", "ver_ge", "all", "any", "when", "not"} { + if heads[sugar] { + t.Errorf("sugar head %q left unexpanded", sugar) + } + } + }) + } +} + +func TestCompactBindOperandLeavesSymbolOperandsAlone(t *testing.T) { + root := parseDesugar(t, `(cli_app (print (list_get xs 0)) (print (parse_json T raw)))`) + if got := root.Children[1].Children[1].Children[0].Value; got != "list_get" { + t.Fatalf("symbol list_get rewritten to %s", got) + } + if got := root.Children[2].Children[1].Children[0].Value; got != "parse_json" { + t.Fatalf("symbol parse_json rewritten to %s", got) + } +} diff --git a/internal/bytecode/construct_drift_test.go b/internal/bytecode/construct_drift_test.go index 93ac3210..e43d4322 100644 --- a/internal/bytecode/construct_drift_test.go +++ b/internal/bytecode/construct_drift_test.go @@ -123,6 +123,10 @@ func TestCompileTimeOnlyConstructsReachingCompileNodeHaveCases(t *testing.T) { "not": true, // ast.Desugar "blank": true, // ast.Desugar "unix_now": true, // ast.Desugar + "all": true, // ast.Desugar + "any": true, // ast.Desugar + "ver_gt": true, // ast.Desugar + "ver_ge": true, // ast.Desugar "nz": true, // ast.Desugar "sget": true, // ast.Desugar "sinc": true, // ast.Desugar diff --git a/internal/construct/construct.go b/internal/construct/construct.go index dacdd07c..b12e46d4 100644 --- a/internal/construct/construct.go +++ b/internal/construct/construct.go @@ -91,7 +91,9 @@ var table = []Entry{ {Name: ">", Support: Supported, Note: "compileNode binop case"}, {Name: ">=", Support: Supported, Note: "compileNode binop case"}, {Name: "achieve", Support: Supported, Opaque: true, Note: "ACHIEVE; operands are stringified via ast.Stringify, not compiled"}, + {Name: "all", Support: CompileTimeOnly, Note: "density sugar; (all x list pred) → for/when/not flag scan by ast.Desugar (pure)"}, {Name: "and", Support: Supported, Note: "compileNode binop case"}, + {Name: "any", Support: CompileTimeOnly, Note: "density sugar; (any x list pred) → for/when flag scan by ast.Desugar (pure)"}, {Name: "append", Support: Supported, Note: "APPEND"}, {Name: "assert", Support: CompileTimeOnly, Note: "density sugar; expanded to if/stderr/exit by ast.Desugar before lowering"}, {Name: "assert_semantic", Support: Unsupported, Note: "LLM intent assertion; no opcode, Go backend only"}, @@ -210,6 +212,8 @@ var table = []Entry{ {Name: "unix_now", Support: CompileTimeOnly, Note: "density sugar; (unix_now) → (to_string (time_now)) by ast.Desugar"}, {Name: "unless", Support: CompileTimeOnly, Note: "density sugar; (unless test body…) → if with empty then by ast.Desugar"}, {Name: "use", Support: CompileTimeOnly, Note: "resolved by parser.ExpandIncludes/ast.ResolveModules before checker.Check or lowering ever run (improvements.md #95); nested use inside an already-used module is rejected at parse time instead"}, + {Name: "ver_ge", Support: CompileTimeOnly, Note: "density sugar; strict numeric x.y.z a >= b via str_split/to_int/list_get by ast.Desugar (pure)"}, + {Name: "ver_gt", Support: CompileTimeOnly, Note: "density sugar; strict numeric x.y.z a > b via str_split/to_int/list_get by ast.Desugar (pure)"}, {Name: "wasm_app", Support: Supported, Note: "compiles every child in sequence"}, {Name: "web_app", Support: Supported, Note: "compiles every child in sequence"}, {Name: "when", Support: CompileTimeOnly, Note: "density sugar; (when test body…) → if with empty else by ast.Desugar"}, @@ -438,6 +442,15 @@ func scanSupported(node *ast.Node, head string, out *[]Violation, profile Profil } scanChildren(node, head, out, 2, profile) case "parse_json": + // Governed pre-desugar profile scan: an expression operand is + // allowed because ast.Desugar binds it to a temporary before any + // lowering, but the operand itself is still scanned so forbidden + // constructs inside it are rejected before anything compiles or + // runs. The default Scan (post-desugar construct gate) stays strict. + if profile == ProfileGoverned && len(node.Children) > 2 && node.Children[2] != nil && node.Children[2].Type == "List" { + scanNode(node.Children[2], head, out, profile) + return + } if len(node.Children) > 2 && node.Children[2] != nil && node.Children[2].Type != "SYMBOL" { *out = append(*out, Violation{ Name: "parse_json",