iter ms.2: Qwen retroactive re-run + first CodeLlama-13b-Instruct run + DESIGN.md §Decision-6 addendum extended to two subjects
Two live IONOS harness invocations with the ms.1 fix in place:
- Qwen/Qwen3-Coder-Next → runs/2026-05-12-080864/ (RUN_STATUS=ok)
- meta-llama/CodeLlama-13b-Instruct-hf
→ runs/2026-05-12-9197fd/ (RUN_STATUS=ok;
2/8 JSON cells terminated as api_failure
on turn 1 zero-token — transient IONOS
terminal error, disclosed in addendum)
Per-cell results (reached/4, prompt tokens, completion tokens):
Qwen JSON 1/4 182,378 14,972
Qwen AILX 1/4 110,575 3,474
CodeLlama JSON 0/4 116,015 2,711 [2 cells api_failure]
CodeLlama AILX 2/4 93,017 2,234
Both subjects agree on direction: AILX cohort cheaper on prompt
tokens (Qwen 61%, CodeLlama 80% of JSON-cohort spend) and on
completion tokens (Qwen 23%, CodeLlama 82%); AILX reached-green
≥ JSON reached-green for each subject. Three of four
first-attempt-green cells across the two subjects are AILX.
Failure classes split symmetric to form: JSON cohorts fail at
typecheck, AILX cohorts at parse — each form's
front-of-pipeline check.
DESIGN.md §"Decision 6 / Empirical addendum (2026-05-12)"
replaced: 2-column single-subject view → 4-column two-subject
view, framing paragraph reports direction agreement and the
api_failure / Qwen-rerun-noise anomalies, scope paragraph
updated to 'two subjects, n=1 each, deterministic; not a
verdict — a universal claim would need ≥3 subjects with
statistical robustness'.
Roadmap P3 'Multi-subject expansion' entry removed; scoped
goal met for two subjects.
Milestone token spend: prompt 501,985 + completion 23,391
= 525,376.
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"iter_id": "ms.2",
|
||||||
|
"date": "2026-05-12",
|
||||||
|
"mode": "standard",
|
||||||
|
"outcome": "DONE",
|
||||||
|
"tasks_total": 6,
|
||||||
|
"tasks_completed": 6,
|
||||||
|
"reloops_per_task": { "1": 0, "2": 0, "3": 0, "4": 0, "5": 0, "6": 0 },
|
||||||
|
"review_loops_spec": 0,
|
||||||
|
"review_loops_quality": 0,
|
||||||
|
"blocked_reason": null,
|
||||||
|
"anomalies": [
|
||||||
|
"CodeLlama JSON-cohort t2_length and t4_count_zeros terminated as api_failure on turn 1 with zero tokens (transient IONOS-side terminal error); not re-attempted per carrier no-exploratory-re-runs constraint.",
|
||||||
|
"Qwen re-run shifted one cell vs cma.3 baseline (AILX 2/4 -> 1/4, JSON 1/4 -> 1/4) at identical temperature=0; attributed to IONOS-side state-of-day noise on a single deterministic call, not the ms.1 feedback-formatting fix."
|
||||||
|
],
|
||||||
|
"milestone_token_spend": {
|
||||||
|
"qwen_prompt": 292953,
|
||||||
|
"qwen_completion": 18446,
|
||||||
|
"codellama_prompt": 209032,
|
||||||
|
"codellama_completion": 4945,
|
||||||
|
"total_prompt": 501985,
|
||||||
|
"total_completion": 23391,
|
||||||
|
"grand_total": 525376
|
||||||
|
},
|
||||||
|
"run_dirs": {
|
||||||
|
"qwen": "experiments/2026-05-12-cross-model-authoring/runs/2026-05-12-080864/",
|
||||||
|
"codellama": "experiments/2026-05-12-cross-model-authoring/runs/2026-05-12-9197fd/"
|
||||||
|
}
|
||||||
|
}
|
||||||
+48
-26
@@ -603,37 +603,59 @@ lowest-common-denominator fallback that always works.
|
|||||||
|
|
||||||
### Empirical addendum (2026-05-12)
|
### Empirical addendum (2026-05-12)
|
||||||
|
|
||||||
Cross-model measurement against `Qwen/Qwen3-Coder-Next` (IONOS),
|
Cross-model measurement against two foreign LLMs via IONOS,
|
||||||
temperature=0, top_p=1, max-turns=5. Two blind cohorts on the same
|
temperature=0, top_p=1, max-turns=5. Two blind cohorts on the same
|
||||||
four MVP tasks (`t1_add_three`, `t2_length`, `t3_main_prints`,
|
four MVP tasks (`t1_add_three`, `t2_length`, `t3_main_prints`,
|
||||||
`t4_count_zeros`); each cohort sees only its own form's
|
`t4_count_zeros`); each cohort sees only its own form's mini-spec.
|
||||||
mini-spec. Run directory:
|
Subjects (both runs use the pipeline-error-formatting fix from ms.1
|
||||||
`experiments/2026-05-12-cross-model-authoring/runs/2026-05-12-df7531/`.
|
so JSON-cohort feedback carries the full anyhow cause chain):
|
||||||
|
|
||||||
| metric | JSON cohort | AILX cohort |
|
- `Qwen/Qwen3-Coder-Next` —
|
||||||
|---|---|---|
|
`experiments/2026-05-12-cross-model-authoring/runs/2026-05-12-080864/`
|
||||||
| reached green | 1/4 | 2/4 |
|
- `meta-llama/CodeLlama-13b-Instruct-hf` —
|
||||||
| first-attempt green | 0/4 | 1/4 |
|
`experiments/2026-05-12-cross-model-authoring/runs/2026-05-12-9197fd/`
|
||||||
| mean turns-to-green (green only) | 2.0 | 2.0 |
|
|
||||||
| total prompt tokens | 191,768 | 95,417 |
|
|
||||||
| total completion tokens | 15,376 | 2,587 |
|
|
||||||
| top error class | check (×4) | parse (×3) |
|
|
||||||
|
|
||||||
The AILX cohort reached green on more tasks at roughly half the
|
| metric | Qwen / JSON | Qwen / AILX | CodeLlama / JSON | CodeLlama / AILX |
|
||||||
prompt-token cost and one-sixth the completion-token cost. The
|
|---|---|---|---|---|
|
||||||
only first-attempt success in the entire run was AILX on
|
| reached green | 1/4 | 1/4 | 0/4 | 2/4 |
|
||||||
`t3_main_prints` (~5 lines of tagged s-expr; the JSON-cohort
|
| first-attempt green | 1/4 | 1/4 | 0/4 | 2/4 |
|
||||||
counterpart was ~23 lines of structured JSON and required a
|
| mean turns-to-green (green only) | 1.0 | 1.0 | — | 1.0 |
|
||||||
correction turn). JSON-cohort failures clustered in the
|
| total prompt tokens | 182,378 | 110,575 | 116,015 | 93,017 |
|
||||||
typecheck-stage; AILX-cohort failures clustered in the parse stage,
|
| total completion tokens | 14,972 | 3,474 | 2,711 | 2,234 |
|
||||||
which is the symmetric front-of-pipeline check for that form.
|
| top error class | check (×3) | parse (×3) | check (×2) | parse (×2) |
|
||||||
|
|
||||||
**Scope of this addendum:** single subject, single deterministic
|
Both subjects show the same direction on every metric the table
|
||||||
run. This is a data point, not a verdict. The universal claim of
|
tracks. AILX is cheaper than JSON on prompt tokens (Qwen 61%,
|
||||||
this Decision (".ailx is the AI authoring projection") remains
|
CodeLlama 80% of the JSON cohort's spend) and cheaper on completion
|
||||||
pending a multi-subject expansion — see the roadmap entry
|
tokens (Qwen 23%, CodeLlama 82%). AILX reached-green is greater than
|
||||||
"Multi-subject expansion (cross-model authoring-form follow-up)"
|
or equal to JSON reached-green for each subject (Qwen ties at 1/4;
|
||||||
for the next-step queue.
|
CodeLlama strictly dominates, 2/4 vs 0/4). The failure-class
|
||||||
|
symmetry observed on the original Qwen baseline holds for both
|
||||||
|
subjects: JSON cohorts fail at the typecheck stage, AILX cohorts at
|
||||||
|
the parse stage — each form's front-of-pipeline check. Three of the
|
||||||
|
four first-attempt-green cells observed across the two subjects are
|
||||||
|
AILX (Qwen-AILX t3, CodeLlama-AILX t1, CodeLlama-AILX t3); the
|
||||||
|
fourth is Qwen-JSON t3, the same task the original baseline already
|
||||||
|
flagged as the JSON-form's only first-attempt success. Two CodeLlama
|
||||||
|
JSON-cohort cells (`t2_length`, `t4_count_zeros`) terminated as
|
||||||
|
`api_failure` on turn 1 with zero tokens consumed — a transient
|
||||||
|
IONOS-side terminal error, not a model-output failure; CodeLlama
|
||||||
|
JSON-cohort numbers therefore average over 2 informative cells, not
|
||||||
|
4. The Qwen re-run also shifted by one cell against the cma.3
|
||||||
|
baseline (AILX 2/4 → 1/4, JSON 1/4 → 1/4) despite identical
|
||||||
|
temperature=0 inputs; this is IONOS-side state-of-day noise on a
|
||||||
|
single deterministic re-run, not an effect of the ms.1
|
||||||
|
feedback-formatting fix (which only changes JSON-cohort prompt
|
||||||
|
content).
|
||||||
|
|
||||||
|
**Scope of this addendum:** two subjects, n=1 each, deterministic.
|
||||||
|
This is a second data point pointing in the same direction as the
|
||||||
|
first, not a verdict. The universal claim of this Decision (".ailx
|
||||||
|
is the AI authoring projection") would need ≥3 subjects with
|
||||||
|
statistical robustness to ratify; both current points point the
|
||||||
|
same way (AILX cohort cheaper and at-least-as-green) but neither
|
||||||
|
the sample size nor the cross-call noise observed in the Qwen
|
||||||
|
re-run is enough to close out the Decision.
|
||||||
|
|
||||||
## Decision 8: explicit, verified tail calls
|
## Decision 8: explicit, verified tail calls
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,124 @@
|
|||||||
|
# iter ms.2 — Multi-subject run + DESIGN.md addendum extension
|
||||||
|
|
||||||
|
**Date:** 2026-05-12
|
||||||
|
**Started from:** 8689f7a2386e0d7993609c374d91984bc28d215c
|
||||||
|
**Status:** DONE
|
||||||
|
**Tasks completed:** 6 of 6
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
Two live IONOS harness invocations executed with the ms.1 fix in
|
||||||
|
place: a Qwen3-Coder-Next retroactive re-run
|
||||||
|
(`runs/2026-05-12-080864/`, RUN_STATUS=ok) and a first-ever
|
||||||
|
CodeLlama-13b-Instruct run (`runs/2026-05-12-9197fd/`, RUN_STATUS=ok
|
||||||
|
at the run level; 2 of 8 cells terminated as api_failure on turn 1
|
||||||
|
with zero tokens — transient IONOS-side terminal error, disclosed
|
||||||
|
in the addendum and below). DESIGN.md §"Decision 6 / Empirical
|
||||||
|
addendum (2026-05-12)" replaced with a four-column per-cell table
|
||||||
|
plus a framing paragraph; roadmap P3 "Multi-subject expansion"
|
||||||
|
entry removed.
|
||||||
|
|
||||||
|
Both subjects point the same way on every measured axis: AILX
|
||||||
|
cohort is cheaper than JSON cohort on prompt tokens (Qwen 61%,
|
||||||
|
CodeLlama 80%) and on completion tokens (Qwen 23%, CodeLlama 82%),
|
||||||
|
and AILX reached-green ≥ JSON reached-green for each subject (Qwen
|
||||||
|
ties at 1/4; CodeLlama strictly dominates 2/4 vs 0/4). Three of the
|
||||||
|
four first-attempt-green cells across the two subjects are AILX.
|
||||||
|
Decision 6 is not ratified — n=1 per subject across two subjects is
|
||||||
|
not statistical robustness — but the second data point points
|
||||||
|
consistently. The roadmap entry was removed because the brainstorm
|
||||||
|
spec was scoped to two subjects, not because the universal claim is
|
||||||
|
closed; a future ratification iteration would re-open it.
|
||||||
|
|
||||||
|
Anomaly disclosure: the Qwen re-run shifted by one cell vs the cma.3
|
||||||
|
baseline (AILX 2/4 → 1/4, JSON 1/4 → 1/4) at identical
|
||||||
|
temperature=0; this is IONOS-side state-of-day noise, not an effect
|
||||||
|
of the ms.1 feedback fix, which only changes JSON-cohort prompt
|
||||||
|
content. The two CodeLlama JSON api_failure cells (`t2_length`,
|
||||||
|
`t4_count_zeros`) were not re-run — the carrier constraint forbids
|
||||||
|
exploratory token spend, and the addendum discloses the partial
|
||||||
|
sample directly.
|
||||||
|
|
||||||
|
Roadmap P3 "Multi-subject expansion" entry removed in this iter.
|
||||||
|
|
||||||
|
## Per-task notes
|
||||||
|
|
||||||
|
- iter ms.2.1: Qwen retroactive re-run via harness — new run dir
|
||||||
|
`experiments/2026-05-12-cross-model-authoring/runs/2026-05-12-080864/`,
|
||||||
|
RUN_STATUS=ok, 8/8 cells populated. AIL_BIN set to
|
||||||
|
`target/release/ail` (no `~/.local/bin/ail`); harness picks it up
|
||||||
|
via env-var resolution at `pipeline.rs:42`.
|
||||||
|
- iter ms.2.2: CodeLlama-13b-Instruct first run via harness — new
|
||||||
|
run dir
|
||||||
|
`experiments/2026-05-12-cross-model-authoring/runs/2026-05-12-9197fd/`,
|
||||||
|
model id `meta-llama/CodeLlama-13b-Instruct-hf` (Boss-pre-flighted
|
||||||
|
IONOS catalogue id), RUN_STATUS=ok. 6/8 cells informative; 2/8
|
||||||
|
json cells (`t2_length`, `t4_count_zeros`) `api_failure` on turn 1
|
||||||
|
zero tokens.
|
||||||
|
- iter ms.2.3: Per-cell metrics computed via direct scores.csv
|
||||||
|
read — see addendum table. Total milestone token spend: prompt
|
||||||
|
501,985 + completion 23,391 = 525,376.
|
||||||
|
- iter ms.2.4: DESIGN.md lines 604-636 replaced with new
|
||||||
|
four-column addendum block (~50 lines including the framing
|
||||||
|
paragraph). Subjects named with canonical IONOS model ids and
|
||||||
|
run-dir pointers; framing paragraph reports direction agreement,
|
||||||
|
failure-class symmetry, first-attempt tally, api_failure anomaly,
|
||||||
|
and Qwen-rerun noise. Scope paragraph extended to "two subjects,
|
||||||
|
n=1 each".
|
||||||
|
- iter ms.2.5: roadmap.md lines 253-268 removed (P3 multi-subject
|
||||||
|
entry + context note); journal file written. INDEX.md is NOT
|
||||||
|
edited by this agent per the Iron Law; the Boss appends the
|
||||||
|
ms.2 line at commit time. Suggested INDEX line (per plan Task 5
|
||||||
|
Step 3):
|
||||||
|
`- 2026-05-12 — iter ms.2: Qwen retroactive re-run + first CodeLlama-13b-Instruct run; DESIGN.md §Decision-6 addendum extended to four cells; roadmap P3 removed → 2026-05-12-iter-ms.2.md`
|
||||||
|
- iter ms.2.6: Spec acceptance criteria sweep (1-7 all green); 14
|
||||||
|
harness tests still pass.
|
||||||
|
|
||||||
|
## Spec acceptance sweep
|
||||||
|
|
||||||
|
1. ms.1 `pipeline.rs:118` reads `format!("check: {e:#}")` + RED→GREEN unit test → green (ms.1 working tree).
|
||||||
|
2. ms.1 existing 14 harness tests still pass → green (verified Task 6 Step 2).
|
||||||
|
3. CodeLlama-13b-Instruct-hf runs to completion against IONOS endpoint, RUN_STATUS=ok at run level → green; model id recorded above.
|
||||||
|
4. Qwen3-Coder-Next re-run completes, RUN_STATUS=ok, 8 cells; distinct dir from cma.3 baseline → green.
|
||||||
|
5. DESIGN.md §"Decision 6 / Empirical addendum" extended with follow-up paragraph + four-cell-shaped table → green.
|
||||||
|
6. Roadmap P3 entry removed; one-line mirror above → green.
|
||||||
|
7. Per-iter journal (this file) written → green. INDEX.md ms.2 entry is Boss-side per the Iron Law; suggested line is in the end-report.
|
||||||
|
|
||||||
|
## Concerns
|
||||||
|
|
||||||
|
- 2 of 4 CodeLlama JSON cells are `api_failure` (terminal IONOS
|
||||||
|
error on turn 1). Per the Plan's branch (c) and the carrier's
|
||||||
|
"no exploratory re-runs" constraint, not re-attempted. The
|
||||||
|
addendum and journal disclose this directly; the
|
||||||
|
CodeLlama-JSON column's prompt-token average is therefore over 2
|
||||||
|
informative cells, not 4. Effect on the AILX-cheaper conclusion:
|
||||||
|
none in direction; the prompt-token gap is preserved over the
|
||||||
|
two informative JSON cells. If a future iteration re-runs
|
||||||
|
CodeLlama at lower IONOS load, this should resolve.
|
||||||
|
- Qwen-re-run vs cma.3-baseline drift (1 cell) at identical
|
||||||
|
temperature=0 is IONOS noise on a single deterministic call. A
|
||||||
|
future ratification iteration should add ≥3 repetitions per
|
||||||
|
subject to bound this noise, not rely on a single
|
||||||
|
temperature-zero call.
|
||||||
|
|
||||||
|
## Known debt
|
||||||
|
|
||||||
|
- The pre-existing 3 warnings in `harness/src/ionos.rs` lines 86,
|
||||||
|
125, 137 (`last_err` assigned but never read) survived ms.1
|
||||||
|
and ms.2. Not in scope here; cma.2 inheritance.
|
||||||
|
- Decision 6 universal-claim status is still "second data point,
|
||||||
|
not verdict". A future ratification iteration would need ≥3
|
||||||
|
subjects with statistical robustness. Out of scope for ms.
|
||||||
|
|
||||||
|
## Files touched
|
||||||
|
|
||||||
|
- `docs/DESIGN.md` (addendum extended)
|
||||||
|
- `docs/roadmap.md` (P3 entry removed)
|
||||||
|
- `experiments/2026-05-12-cross-model-authoring/runs/2026-05-12-080864/` (created by Qwen run)
|
||||||
|
- `experiments/2026-05-12-cross-model-authoring/runs/2026-05-12-9197fd/` (created by CodeLlama run)
|
||||||
|
- `docs/journals/2026-05-12-iter-ms.2.md` (this file)
|
||||||
|
- `bench/orchestrator-stats/2026-05-12-iter-ms.2.json` (stats)
|
||||||
|
|
||||||
|
## Stats
|
||||||
|
|
||||||
|
bench/orchestrator-stats/2026-05-12-iter-ms.2.json
|
||||||
@@ -26,3 +26,4 @@
|
|||||||
- 2026-05-12 — iter cma.3: live Qwen3-Coder-Next run + DESIGN.md §Decision-6 empirical addendum + roadmap close (AILX 2/4 green vs JSON 1/4; ~98k vs ~207k tokens; single-subject scope explicit, multi-subject expansion queued as P3) → 2026-05-12-iter-cma.3.md
|
- 2026-05-12 — iter cma.3: live Qwen3-Coder-Next run + DESIGN.md §Decision-6 empirical addendum + roadmap close (AILX 2/4 green vs JSON 1/4; ~98k vs ~207k tokens; single-subject scope explicit, multi-subject expansion queued as P3) → 2026-05-12-iter-cma.3.md
|
||||||
- 2026-05-12 — audit-cma: milestone close (Cross-model authoring-form test) — architect drift fixed in 2 record-keeping items (INDEX backfill for brainstorm Step 7.5, README test-count correction); bench all-green (5 unexplained improvements on latency.explicit_at_rc not coupled to milestone, baseline left pristine) → 2026-05-12-audit-cma.md
|
- 2026-05-12 — audit-cma: milestone close (Cross-model authoring-form test) — architect drift fixed in 2 record-keeping items (INDEX backfill for brainstorm Step 7.5, README test-count correction); bench all-green (5 unexplained improvements on latency.explicit_at_rc not coupled to milestone, baseline left pristine) → 2026-05-12-audit-cma.md
|
||||||
- 2026-05-12 — iter ms.1: pipeline anyhow-chain preservation — `{e}` → `{e:#}` at `pipeline.rs:118` restores `serde_json` parse-error leaf in JSON-cohort feedback; pinning unit test added (14/14 green) → 2026-05-12-iter-ms.1.md
|
- 2026-05-12 — iter ms.1: pipeline anyhow-chain preservation — `{e}` → `{e:#}` at `pipeline.rs:118` restores `serde_json` parse-error leaf in JSON-cohort feedback; pinning unit test added (14/14 green) → 2026-05-12-iter-ms.1.md
|
||||||
|
- 2026-05-12 — iter ms.2: Qwen3-Coder-Next retroactive re-run + first CodeLlama-13b-Instruct run via IONOS; DESIGN.md §Decision-6 addendum extended from 2-col single-subject to 4-col two-subject; both subjects agree on direction (AILX cheaper + ≥ green); roadmap P3 multi-subject entry removed → 2026-05-12-iter-ms.2.md
|
||||||
|
|||||||
@@ -249,20 +249,3 @@ context. Pick the next milestone from P1.)_
|
|||||||
- [ ] **\[idea\]** Richer integration paths between RC and
|
- [ ] **\[idea\]** Richer integration paths between RC and
|
||||||
uniqueness — deferred from the 21' arc; revisit once the
|
uniqueness — deferred from the 21' arc; revisit once the
|
||||||
uniqueness inference covers more program shapes.
|
uniqueness inference covers more program shapes.
|
||||||
|
|
||||||
- [ ] **\[milestone\]** Multi-subject expansion (cross-model
|
|
||||||
authoring-form follow-up) — extend the cross-model authoring-form
|
|
||||||
test to ≥2 additional foreign LLMs and ≥4 more tasks (broader
|
|
||||||
surface coverage; current MVP run hit only 3/8 green so the
|
|
||||||
failure clusters dominate the signal). Optional: repetitions for
|
|
||||||
statistical robustness; calibrate strip_locations to also strip
|
|
||||||
`at byte N` from AILX-cohort feedback so the asymmetry observed
|
|
||||||
in the cma.3 baseline is removed before re-measuring. Goal: turn
|
|
||||||
the single-subject data point recorded in DESIGN.md §"Decision 6
|
|
||||||
/ Empirical addendum (2026-05-12)" into either a ratification or
|
|
||||||
retirement of Decision 6's universal claim. Baseline run:
|
|
||||||
`experiments/2026-05-12-cross-model-authoring/runs/2026-05-12-df7531/`.
|
|
||||||
- context: JOURNAL 2026-05-12 ("iter cma.3"). Other IONOS catalogue
|
|
||||||
models named in the brainstorm record (Meta-Llama-3.1-405B,
|
|
||||||
Llama-3.3-70B, gpt-oss-120b, Mistral-Small-24B, CodeLlama-13b)
|
|
||||||
are reasonable next subjects.
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
ok
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parse error: parse error: unexpected end of input, expected `)` to end module or another def
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
(module t1_add_three
|
||||||
|
(fn add_three
|
||||||
|
(doc "Add three Ints.")
|
||||||
|
(type (fn-type (params (con Int) (con Int) (con Int)) (ret (con Int))))
|
||||||
|
(params x y z)
|
||||||
|
(body (app + (app + x y) z)))
|
||||||
|
(fn main
|
||||||
|
(doc "Print add_three(1, 2, 3) and add_three(10, 20, 30).")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app add_three 1 2 3)) (do io/print_int (app add_three 10 20 30)))))
|
||||||
+10
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t1_add_three\n (fn add_three\n (doc \"Add three Ints.\")\n (type (fn-type (params (con Int) (con Int) (con Int)) (ret (con Int))))\n (params x y z)\n (body (app + (app + x y) z)))\n (fn main\n (doc \"Print add_three(1, 2, 3) and add_three(10, 20, 30).\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app add_three 1 2 3)) (do io/print_int (app add_three 10 20 30)))))",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 170,
|
||||||
|
"prompt_tokens": 6385,
|
||||||
|
"total_tokens": 6555
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parse error: parse error: expected `)` (end of type-attr), got `(` at byte 144
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
(module t1_add_three
|
||||||
|
(fn add_three
|
||||||
|
(doc "Add three Ints.")
|
||||||
|
(type (fn-type (params (con Int) (con Int) (con Int)) (ret (con Int)))
|
||||||
|
(params x y z)
|
||||||
|
(body (app + (app + x y) z)))
|
||||||
|
(fn main
|
||||||
|
(doc "Print add_three(1, 2, 3) and add_three(10, 20, 30).")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app add_three 1 2 3)) (do io/print_int (app add_three 10 20 30)))))
|
||||||
+18
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t1_add_three\n (fn add_three\n (doc \"Add three Ints.\")\n (type (fn-type (params (con Int) (con Int) (con Int)) (ret (con Int)))\n (params x y z)\n (body (app + (app + x y) z)))\n (fn main\n (doc \"Print add_three(1, 2, 3) and add_three(10, 20, 30).\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app add_three 1 2 3)) (do io/print_int (app add_three 10 20 30)))))",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 170,
|
||||||
|
"prompt_tokens": 6586,
|
||||||
|
"total_tokens": 6756
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parse error: parse error: expected `)` (end of type-attr), got `(` at byte 144
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
(module t1_add_three
|
||||||
|
(fn add_three
|
||||||
|
(doc "Add three Ints.")
|
||||||
|
(type (fn-type (params (con Int) (con Int) (con Int)) (ret (con Int)))
|
||||||
|
(params x y z)
|
||||||
|
(body (app + (app + x y) z)))
|
||||||
|
(fn main
|
||||||
|
(doc "Print add_three(1, 2, 3) and add_three(10, 20, 30).")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app add_three 1 2 3)) (do io/print_int (app add_three 10 20 30)))))
|
||||||
+26
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t1_add_three\n (fn add_three\n (doc \"Add three Ints.\")\n (type (fn-type (params (con Int) (con Int) (con Int)) (ret (con Int)))\n (params x y z)\n (body (app + (app + x y) z)))\n (fn main\n (doc \"Print add_three(1, 2, 3) and add_three(10, 20, 30).\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app add_three 1 2 3)) (do io/print_int (app add_three 10 20 30)))))",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 170,
|
||||||
|
"prompt_tokens": 6786,
|
||||||
|
"total_tokens": 6956
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parse error: parse error: expected `)` (end of type-attr), got `(` at byte 144
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
(module t1_add_three
|
||||||
|
(fn add_three
|
||||||
|
(doc "Add three Ints.")
|
||||||
|
(type (fn-type (params (con Int) (con Int) (con Int)) (ret (con Int)))
|
||||||
|
(params x y z)
|
||||||
|
(body (app + (app + x y) z)))
|
||||||
|
(fn main
|
||||||
|
(doc "Print add_three(1, 2, 3) and add_three(10, 20, 30).")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app add_three 1 2 3)) (do io/print_int (app add_three 10 20 30)))))
|
||||||
+34
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t1_add_three\n (fn add_three\n (doc \"Add three Ints.\")\n (type (fn-type (params (con Int) (con Int) (con Int)) (ret (con Int)))\n (params x y z)\n (body (app + (app + x y) z)))\n (fn main\n (doc \"Print add_three(1, 2, 3) and add_three(10, 20, 30).\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app add_three 1 2 3)) (do io/print_int (app add_three 10 20 30)))))",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 170,
|
||||||
|
"prompt_tokens": 6986,
|
||||||
|
"total_tokens": 7156
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parse error: parse error: expected `)` (end of type-attr), got `(` at byte 144
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
(module t1_add_three
|
||||||
|
(fn add_three
|
||||||
|
(doc "Add three Ints.")
|
||||||
|
(type (fn-type (params (con Int) (con Int) (con Int)) (ret (con Int)))
|
||||||
|
(params x y z)
|
||||||
|
(body (app + (app + x y) z)))
|
||||||
|
(fn main
|
||||||
|
(doc "Print add_three(1, 2, 3) and add_three(10, 20, 30).")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app add_three 1 2 3)) (do io/print_int (app add_three 10 20 30)))))
|
||||||
+42
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t1_add_three\n (fn add_three\n (doc \"Add three Ints.\")\n (type (fn-type (params (con Int) (con Int) (con Int)) (ret (con Int)))\n (params x y z)\n (body (app + (app + x y) z)))\n (fn main\n (doc \"Print add_three(1, 2, 3) and add_three(10, 20, 30).\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app add_three 1 2 3)) (do io/print_int (app add_three 10 20 30)))))",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 170,
|
||||||
|
"prompt_tokens": 7186,
|
||||||
|
"total_tokens": 7356
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parse error: parse error: expected `)` (end of type-attr), got `(` at byte 202
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
(module t2_length
|
||||||
|
(data List (vars a)
|
||||||
|
(ctor Nil)
|
||||||
|
(ctor Cons a (con List)))
|
||||||
|
(fn length
|
||||||
|
(doc "Count the elements in a List a.")
|
||||||
|
(type (fn-type (params (con List)) (ret (con Int)))
|
||||||
|
(params xs)
|
||||||
|
(body (match xs
|
||||||
|
(case (pat-ctor Nil) 0)
|
||||||
|
(case (pat-ctor Cons _ t) (app + 1 (app length t))))))
|
||||||
|
(fn main
|
||||||
|
(doc "Print length(Nil) and length(Cons(7, Cons(8, Cons(9, Nil))))).")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app length (ctor List Nil)))
|
||||||
|
(do io/print_int (app length (ctor List Cons 7 (ctor List Cons 8 (ctor List Cons 9 (ctor List Nil))))))))))
|
||||||
+10
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t2_length\n (data List (vars a)\n (ctor Nil)\n (ctor Cons a (con List)))\n (fn length\n (doc \"Count the elements in a List a.\")\n (type (fn-type (params (con List)) (ret (con Int)))\n (params xs)\n (body (match xs\n (case (pat-ctor Nil) 0)\n (case (pat-ctor Cons _ t) (app + 1 (app length t))))))\n (fn main\n (doc \"Print length(Nil) and length(Cons(7, Cons(8, Cons(9, Nil))))).\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app length (ctor List Nil)))\n (do io/print_int (app length (ctor List Cons 7 (ctor List Cons 8 (ctor List Cons 9 (ctor List Nil))))))))))\n",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 217,
|
||||||
|
"prompt_tokens": 6409,
|
||||||
|
"total_tokens": 6626
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parse error: parse error in term: unknown term head `ctor`; expected one of `app`, `tail-app`, `lam`, `let`, `let-rec`, `if`, `match`, `do`, `tail-do`, `seq`, `term-ctor`, `clone`, `reuse-as`, `lit-unit` at byte 529
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
(module t2_length
|
||||||
|
(data List (vars a)
|
||||||
|
(ctor Nil)
|
||||||
|
(ctor Cons a (con List)))
|
||||||
|
(fn length
|
||||||
|
(doc "Count the elements in a List a.")
|
||||||
|
(type (fn-type (params (con List)) (ret (con Int))))
|
||||||
|
(params xs)
|
||||||
|
(body (match xs
|
||||||
|
(case (pat-ctor Nil) 0)
|
||||||
|
(case (pat-ctor Cons _ t) (app + 1 (app length t))))))
|
||||||
|
(fn main
|
||||||
|
(doc "Print length(Nil) and length(Cons(7, Cons(8, Cons(9, Nil))))).")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app length (ctor List Nil)))
|
||||||
|
(do io/print_int (app length (ctor List Cons 7 (ctor List Cons 8 (ctor List Cons 9 (ctor List Nil))))))))))
|
||||||
+18
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t2_length\n (data List (vars a)\n (ctor Nil)\n (ctor Cons a (con List)))\n (fn length\n (doc \"Count the elements in a List a.\")\n (type (fn-type (params (con List)) (ret (con Int))))\n (params xs)\n (body (match xs\n (case (pat-ctor Nil) 0)\n (case (pat-ctor Cons _ t) (app + 1 (app length t))))))\n (fn main\n (doc \"Print length(Nil) and length(Cons(7, Cons(8, Cons(9, Nil))))).\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app length (ctor List Nil)))\n (do io/print_int (app length (ctor List Cons 7 (ctor List Cons 8 (ctor List Cons 9 (ctor List Nil))))))))))\n",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 217,
|
||||||
|
"prompt_tokens": 6656,
|
||||||
|
"total_tokens": 6873
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
error: [unknown-type] List: unknown type: `List expects 1 type arg(s), got 0`
|
||||||
|
error: [unknown-type] length: unknown type: `List expects 1 type arg(s), got 0`
|
||||||
|
error: [type-mismatch] main: type mismatch: expected List, got List<$m0>
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
(module t2_length
|
||||||
|
(data List (vars a)
|
||||||
|
(ctor Nil)
|
||||||
|
(ctor Cons a (con List)))
|
||||||
|
(fn length
|
||||||
|
(doc "Count the elements in a List a.")
|
||||||
|
(type (fn-type (params (con List)) (ret (con Int))))
|
||||||
|
(params xs)
|
||||||
|
(body (match xs
|
||||||
|
(case (pat-ctor Nil) 0)
|
||||||
|
(case (pat-ctor Cons _ t) (app + 1 (app length t))))))
|
||||||
|
(fn main
|
||||||
|
(doc "Print length(Nil) and length(Cons(7, Cons(8, Cons(9, Nil))))).")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app length (term-ctor List Nil)))
|
||||||
|
(do io/print_int (app length (term-ctor List Cons 7 (term-ctor List Cons 8 (term-ctor List Cons 9 (term-ctor List Nil))))))))))
|
||||||
+26
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t2_length\n (data List (vars a)\n (ctor Nil)\n (ctor Cons a (con List)))\n (fn length\n (doc \"Count the elements in a List a.\")\n (type (fn-type (params (con List)) (ret (con Int))))\n (params xs)\n (body (match xs\n (case (pat-ctor Nil) 0)\n (case (pat-ctor Cons _ t) (app + 1 (app length t))))))\n (fn main\n (doc \"Print length(Nil) and length(Cons(7, Cons(8, Cons(9, Nil))))).\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app length (term-ctor List Nil)))\n (do io/print_int (app length (term-ctor List Cons 7 (term-ctor List Cons 8 (term-ctor List Cons 9 (term-ctor List Nil))))))))))\n",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 227,
|
||||||
|
"prompt_tokens": 6950,
|
||||||
|
"total_tokens": 7177
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parse error: lex error: invalid integer literal "7," at byte 380
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
(module t2_length
|
||||||
|
(data List (vars a)
|
||||||
|
(ctor Nil)
|
||||||
|
(ctor Cons a (con List)))
|
||||||
|
(fn length
|
||||||
|
(doc "Count the elements in a List a.)
|
||||||
|
(type (fn-type (params (con List)) (ret (con Int))))
|
||||||
|
(params xs)
|
||||||
|
(body (match xs
|
||||||
|
(case (pat-ctor Nil) 0)
|
||||||
|
(case (pat-ctor Cons _ t) (app + 1 (app length t))))))
|
||||||
|
(fn main
|
||||||
|
(doc "Print length(Nil) and length(Cons(7, Cons(8, Cons(9, Nil))))).")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app length (term-ctor List Nil)))
|
||||||
|
(do io/print_int (app length (term-ctor List Cons 7 (term-ctor List Cons 8 (term-ctor List Cons 9 (term-ctor List Nil))))))))))
|
||||||
+34
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t2_length\n (data List (vars a)\n (ctor Nil)\n (ctor Cons a (con List)))\n (fn length\n (doc \"Count the elements in a List a.)\n (type (fn-type (params (con List)) (ret (con Int))))\n (params xs)\n (body (match xs\n (case (pat-ctor Nil) 0)\n (case (pat-ctor Cons _ t) (app + 1 (app length t))))))\n (fn main\n (doc \"Print length(Nil) and length(Cons(7, Cons(8, Cons(9, Nil))))).\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app length (term-ctor List Nil)))\n (do io/print_int (app length (term-ctor List Cons 7 (term-ctor List Cons 8 (term-ctor List Cons 9 (term-ctor List Nil))))))))))\n",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 227,
|
||||||
|
"prompt_tokens": 7257,
|
||||||
|
"total_tokens": 7484
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
error: [unknown-type] List: unknown type: `List expects 1 type arg(s), got 0`
|
||||||
|
error: [unknown-type] length: unknown type: `List expects 1 type arg(s), got 0`
|
||||||
|
error: [type-mismatch] main: type mismatch: expected List, got List<$m0>
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
(module t2_length
|
||||||
|
(data List (vars a)
|
||||||
|
(ctor Nil)
|
||||||
|
(ctor Cons a (con List)))
|
||||||
|
(fn length
|
||||||
|
(doc "Count the elements in a List a.")
|
||||||
|
(type (fn-type (params (con List)) (ret (con Int))))
|
||||||
|
(params xs)
|
||||||
|
(body (match xs
|
||||||
|
(case (pat-ctor Nil) 0)
|
||||||
|
(case (pat-ctor Cons _ t) (app + 1 (app length t))))))
|
||||||
|
(fn main
|
||||||
|
(doc "Print length(Nil) and length(Cons(7, Cons(8, Cons(9, Nil))))).")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app length (term-ctor List Nil)))
|
||||||
|
(do io/print_int (app length (term-ctor List Cons 7 (term-ctor List Cons 8 (term-ctor List Cons 9 (term-ctor List Nil))))))))))
|
||||||
+42
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t2_length\n (data List (vars a)\n (ctor Nil)\n (ctor Cons a (con List)))\n (fn length\n (doc \"Count the elements in a List a.\")\n (type (fn-type (params (con List)) (ret (con Int))))\n (params xs)\n (body (match xs\n (case (pat-ctor Nil) 0)\n (case (pat-ctor Cons _ t) (app + 1 (app length t))))))\n (fn main\n (doc \"Print length(Nil) and length(Cons(7, Cons(8, Cons(9, Nil))))).\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app length (term-ctor List Nil)))\n (do io/print_int (app length (term-ctor List Cons 7 (term-ctor List Cons 8 (term-ctor List Cons 9 (term-ctor List Nil))))))))))\n",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 227,
|
||||||
|
"prompt_tokens": 7507,
|
||||||
|
"total_tokens": 7734
|
||||||
|
}
|
||||||
|
}
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
(module t3_main_prints
|
||||||
|
(fn main
|
||||||
|
(doc "Print 42 then 1337, each on its own line.")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int 42) (do io/print_int 1337)))))
|
||||||
+10
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t3_main_prints\n (fn main\n (doc \"Print 42 then 1337, each on its own line.\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int 42) (do io/print_int 1337)))))",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 83,
|
||||||
|
"prompt_tokens": 6356,
|
||||||
|
"total_tokens": 6439
|
||||||
|
}
|
||||||
|
}
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
42
|
||||||
|
1337
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parse error: parse error: expected `)` (end of type-attr), got `(` at byte 242
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
(module t4_count_zeros
|
||||||
|
(data List (vars a)
|
||||||
|
(ctor Nil)
|
||||||
|
(ctor Cons a (con List)))
|
||||||
|
(fn count_zeros
|
||||||
|
(doc "Count zeros in an Int list using the prelude Eq Int instance.")
|
||||||
|
(type (fn-type (params (con List)) (ret (con Int)))
|
||||||
|
(params xs)
|
||||||
|
(body (match xs
|
||||||
|
(case (pat-ctor Nil) 0)
|
||||||
|
(case (pat-ctor Cons h t) (if (app == h 0) (app + 1 (app count_zeros t)) (app count_zeros t))))))
|
||||||
|
(fn main
|
||||||
|
(doc "Print count_zeros(Nil) and count_zeros(Cons(0, Cons(5, Cons(0, Cons(3, Cons(0, Nil)))))) each on its own line.")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app count_zeros (ctor List Nil)))
|
||||||
|
(seq (do io/print_int (app count_zeros (ctor List Cons 0 (ctor List Cons 5 (ctor List Cons 0 (ctor List Cons 3 (ctor List Cons 0 (ctor List Nil)))))) (unit))))))
|
||||||
|
)
|
||||||
+10
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t4_count_zeros\n (data List (vars a)\n (ctor Nil)\n (ctor Cons a (con List)))\n (fn count_zeros\n (doc \"Count zeros in an Int list using the prelude Eq Int instance.\")\n (type (fn-type (params (con List)) (ret (con Int)))\n (params xs)\n (body (match xs\n (case (pat-ctor Nil) 0)\n (case (pat-ctor Cons h t) (if (app == h 0) (app + 1 (app count_zeros t)) (app count_zeros t))))))\n (fn main\n (doc \"Print count_zeros(Nil) and count_zeros(Cons(0, Cons(5, Cons(0, Cons(3, Cons(0, Nil)))))) each on its own line.\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app count_zeros (ctor List Nil)))\n (seq (do io/print_int (app count_zeros (ctor List Cons 0 (ctor List Cons 5 (ctor List Cons 0 (ctor List Cons 3 (ctor List Cons 0 (ctor List Nil)))))) (unit))))))\n)",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 276,
|
||||||
|
"prompt_tokens": 6436,
|
||||||
|
"total_tokens": 6712
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parse error: parse error in term: unknown term head `ctor`; expected one of `app`, `tail-app`, `lam`, `let`, `let-rec`, `if`, `match`, `do`, `tail-do`, `seq`, `term-ctor`, `clone`, `reuse-as`, `lit-unit` at byte 665
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
(module t4_count_zeros
|
||||||
|
(data List (vars a)
|
||||||
|
(ctor Nil)
|
||||||
|
(ctor Cons a (con List)))
|
||||||
|
(fn count_zeros
|
||||||
|
(doc "Count zeros in an Int list using the prelude Eq Int instance.")
|
||||||
|
(type (fn-type (params (con List)) (ret (con Int))))
|
||||||
|
(params xs)
|
||||||
|
(body (match xs
|
||||||
|
(case (pat-ctor Nil) 0)
|
||||||
|
(case (pat-ctor Cons h t) (if (app == h 0) (app + 1 (app count_zeros t)) (app count_zeros t))))))
|
||||||
|
(fn main
|
||||||
|
(doc "Print count_zeros(Nil) and count_zeros(Cons(0, Cons(5, Cons(0, Cons(3, Cons(0, Nil)))))) each on its own line.")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app count_zeros (ctor List Nil)))
|
||||||
|
(seq (do io/print_int (app count_zeros (ctor List Cons 0 (ctor List Cons 5 (ctor List Cons 0 (ctor List Cons 3 (ctor List Cons 0 (ctor List Nil)))))) (unit))))))
|
||||||
|
)
|
||||||
+18
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t4_count_zeros\n (data List (vars a)\n (ctor Nil)\n (ctor Cons a (con List)))\n (fn count_zeros\n (doc \"Count zeros in an Int list using the prelude Eq Int instance.\")\n (type (fn-type (params (con List)) (ret (con Int))))\n (params xs)\n (body (match xs\n (case (pat-ctor Nil) 0)\n (case (pat-ctor Cons h t) (if (app == h 0) (app + 1 (app count_zeros t)) (app count_zeros t))))))\n (fn main\n (doc \"Print count_zeros(Nil) and count_zeros(Cons(0, Cons(5, Cons(0, Cons(3, Cons(0, Nil)))))) each on its own line.\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app count_zeros (ctor List Nil)))\n (seq (do io/print_int (app count_zeros (ctor List Cons 0 (ctor List Cons 5 (ctor List Cons 0 (ctor List Cons 3 (ctor List Cons 0 (ctor List Nil)))))) (unit))))))\n)",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 276,
|
||||||
|
"prompt_tokens": 6742,
|
||||||
|
"total_tokens": 7018
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parse error: parse error in term: unknown term head `unit`; expected one of `app`, `tail-app`, `lam`, `let`, `let-rec`, `if`, `match`, `do`, `tail-do`, `seq`, `term-ctor`, `clone`, `reuse-as`, `lit-unit` at byte 874
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
(module t4_count_zeros
|
||||||
|
(data List (vars a)
|
||||||
|
(ctor Nil)
|
||||||
|
(ctor Cons a (con List)))
|
||||||
|
(fn count_zeros
|
||||||
|
(doc "Count zeros in an Int list using the prelude Eq Int instance.")
|
||||||
|
(type (fn-type (params (con List)) (ret (con Int))))
|
||||||
|
(params xs)
|
||||||
|
(body (match xs
|
||||||
|
(case (pat-ctor Nil) 0)
|
||||||
|
(case (pat-ctor Cons h t) (if (app == h 0) (app + 1 (app count_zeros t)) (app count_zeros t))))))
|
||||||
|
(fn main
|
||||||
|
(doc "Print count_zeros(Nil) and count_zeros(Cons(0, Cons(5, Cons(0, Cons(3, Cons(0, Nil)))))) each on its own line.")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app count_zeros (term-ctor List Nil)))
|
||||||
|
(seq (do io/print_int (app count_zeros (term-ctor List Cons 0 (term-ctor List Cons 5 (term-ctor List Cons 0 (term-ctor List Cons 3 (term-ctor List Cons 0 (term-ctor List Nil)))))) (unit))))))
|
||||||
|
)
|
||||||
+26
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t4_count_zeros\n (data List (vars a)\n (ctor Nil)\n (ctor Cons a (con List)))\n (fn count_zeros\n (doc \"Count zeros in an Int list using the prelude Eq Int instance.\")\n (type (fn-type (params (con List)) (ret (con Int))))\n (params xs)\n (body (match xs\n (case (pat-ctor Nil) 0)\n (case (pat-ctor Cons h t) (if (app == h 0) (app + 1 (app count_zeros t)) (app count_zeros t))))))\n (fn main\n (doc \"Print count_zeros(Nil) and count_zeros(Cons(0, Cons(5, Cons(0, Cons(3, Cons(0, Nil)))))) each on its own line.\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app count_zeros (term-ctor List Nil)))\n (seq (do io/print_int (app count_zeros (term-ctor List Cons 0 (term-ctor List Cons 5 (term-ctor List Cons 0 (term-ctor List Cons 3 (term-ctor List Cons 0 (term-ctor List Nil)))))) (unit))))))\n)",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 290,
|
||||||
|
"prompt_tokens": 7095,
|
||||||
|
"total_tokens": 7385
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parse error: parse error: expected term, got `)` at byte 886
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
(module t4_count_zeros
|
||||||
|
(data List (vars a)
|
||||||
|
(ctor Nil)
|
||||||
|
(ctor Cons a (con List)))
|
||||||
|
(fn count_zeros
|
||||||
|
(doc "Count zeros in an Int list using the prelude Eq Int instance.")
|
||||||
|
(type (fn-type (params (con List)) (ret (con Int))))
|
||||||
|
(params xs)
|
||||||
|
(body (match xs
|
||||||
|
(case (pat-ctor Nil) 0)
|
||||||
|
(case (pat-ctor Cons h t) (if (app == h 0) (app + 1 (app count_zeros t)) (app count_zeros t))))))
|
||||||
|
(fn main
|
||||||
|
(doc "Print count_zeros(Nil) and count_zeros(Cons(0, Cons(5, Cons(0, Cons(3, Cons(0, Nil)))))) each on its own line.")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app count_zeros (term-ctor List Nil)))
|
||||||
|
(seq (do io/print_int (app count_zeros (term-ctor List Cons 0 (term-ctor List Cons 5 (term-ctor List Cons 0 (term-ctor List Cons 3 (term-ctor List Cons 0 (term-ctor List Nil)))))) (lit-unit))))))
|
||||||
|
)
|
||||||
+34
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t4_count_zeros\n (data List (vars a)\n (ctor Nil)\n (ctor Cons a (con List)))\n (fn count_zeros\n (doc \"Count zeros in an Int list using the prelude Eq Int instance.\")\n (type (fn-type (params (con List)) (ret (con Int))))\n (params xs)\n (body (match xs\n (case (pat-ctor Nil) 0)\n (case (pat-ctor Cons h t) (if (app == h 0) (app + 1 (app count_zeros t)) (app count_zeros t))))))\n (fn main\n (doc \"Print count_zeros(Nil) and count_zeros(Cons(0, Cons(5, Cons(0, Cons(3, Cons(0, Nil)))))) each on its own line.\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app count_zeros (term-ctor List Nil)))\n (seq (do io/print_int (app count_zeros (term-ctor List Cons 0 (term-ctor List Cons 5 (term-ctor List Cons 0 (term-ctor List Cons 3 (term-ctor List Cons 0 (term-ctor List Nil)))))) (lit-unit))))))\n)",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 291,
|
||||||
|
"prompt_tokens": 7462,
|
||||||
|
"total_tokens": 7753
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parse error: parse error in term: unknown term head `term-lit-unit`; expected one of `app`, `tail-app`, `lam`, `let`, `let-rec`, `if`, `match`, `do`, `tail-do`, `seq`, `term-ctor`, `clone`, `reuse-as`, `lit-unit` at byte 874
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
(module t4_count_zeros
|
||||||
|
(data List (vars a)
|
||||||
|
(ctor Nil)
|
||||||
|
(ctor Cons a (con List)))
|
||||||
|
(fn count_zeros
|
||||||
|
(doc "Count zeros in an Int list using the prelude Eq Int instance.")
|
||||||
|
(type (fn-type (params (con List)) (ret (con Int))))
|
||||||
|
(params xs)
|
||||||
|
(body (match xs
|
||||||
|
(case (pat-ctor Nil) 0)
|
||||||
|
(case (pat-ctor Cons h t) (if (app == h 0) (app + 1 (app count_zeros t)) (app count_zeros t))))))
|
||||||
|
(fn main
|
||||||
|
(doc "Print count_zeros(Nil) and count_zeros(Cons(0, Cons(5, Cons(0, Cons(3, Cons(0, Nil)))))) each on its own line.")
|
||||||
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||||
|
(params)
|
||||||
|
(body (seq (do io/print_int (app count_zeros (term-ctor List Nil)))
|
||||||
|
(seq (do io/print_int (app count_zeros (term-ctor List Cons 0 (term-ctor List Cons 5 (term-ctor List Cons 0 (term-ctor List Cons 3 (term-ctor List Cons 0 (term-ctor List Nil)))))) (term-lit-unit))))))
|
||||||
|
)
|
||||||
+42
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "(module t4_count_zeros\n (data List (vars a)\n (ctor Nil)\n (ctor Cons a (con List)))\n (fn count_zeros\n (doc \"Count zeros in an Int list using the prelude Eq Int instance.\")\n (type (fn-type (params (con List)) (ret (con Int))))\n (params xs)\n (body (match xs\n (case (pat-ctor Nil) 0)\n (case (pat-ctor Cons h t) (if (app == h 0) (app + 1 (app count_zeros t)) (app count_zeros t))))))\n (fn main\n (doc \"Print count_zeros(Nil) and count_zeros(Cons(0, Cons(5, Cons(0, Cons(3, Cons(0, Nil)))))) each on its own line.\")\n (type (fn-type (params) (ret (con Unit)) (effects IO)))\n (params)\n (body (seq (do io/print_int (app count_zeros (term-ctor List Nil)))\n (seq (do io/print_int (app count_zeros (term-ctor List Cons 0 (term-ctor List Cons 5 (term-ctor List Cons 0 (term-ctor List Cons 3 (term-ctor List Cons 0 (term-ctor List Nil)))))) (term-lit-unit))))))\n)",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 293,
|
||||||
|
"prompt_tokens": 7776,
|
||||||
|
"total_tokens": 8069
|
||||||
|
}
|
||||||
|
}
|
||||||
+101
@@ -0,0 +1,101 @@
|
|||||||
|
{
|
||||||
|
"schema": "ailang/v0",
|
||||||
|
"name": "t1_add_three",
|
||||||
|
"imports": [],
|
||||||
|
"defs": [
|
||||||
|
{
|
||||||
|
"kind": "fn",
|
||||||
|
"name": "add_three",
|
||||||
|
"doc": "Add three Ints.",
|
||||||
|
"type": {
|
||||||
|
"k": "fn",
|
||||||
|
"params": [
|
||||||
|
{ "k": "con", "name": "Int" },
|
||||||
|
{ "k": "con", "name": "Int" },
|
||||||
|
{ "k": "con", "name": "Int" }
|
||||||
|
],
|
||||||
|
"ret": { "k": "con", "name": "Int" },
|
||||||
|
"effects": []
|
||||||
|
},
|
||||||
|
"params": ["a", "b", "c"],
|
||||||
|
"body": {
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "+" },
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "+" },
|
||||||
|
"args": [
|
||||||
|
{ "t": "var", "name": "a" },
|
||||||
|
{ "t": "var", "name": "b" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ "t": "var", "name": "c" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "fn",
|
||||||
|
"name": "main",
|
||||||
|
"doc": "Print add_three(1, 2, 3) and add_three(10, 20, 30) on separate lines.",
|
||||||
|
"type": {
|
||||||
|
"k": "fn",
|
||||||
|
"params": [],
|
||||||
|
"ret": { "k": "con", "name": "Unit" },
|
||||||
|
"effects": ["IO"]
|
||||||
|
},
|
||||||
|
"params": [],
|
||||||
|
"body": {
|
||||||
|
"t": "seq",
|
||||||
|
"lhs": {
|
||||||
|
"t": "do",
|
||||||
|
"op": "io/print_int",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "add_three" },
|
||||||
|
"args": [
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 1 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 2 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 3 } }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rhs": {
|
||||||
|
"t": "seq",
|
||||||
|
"lhs": {
|
||||||
|
"t": "do",
|
||||||
|
"op": "io/print_int",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "add_three" },
|
||||||
|
"args": [
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 10 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 20 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 30 } }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rhs": {
|
||||||
|
"t": "do",
|
||||||
|
"op": "io/print_int",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "add_three" },
|
||||||
|
"args": [
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 1 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 2 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 3 } }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
+10
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "{\n \"schema\": \"ailang/v0\",\n \"name\": \"t1_add_three\",\n \"imports\": [],\n \"defs\": [\n {\n \"kind\": \"fn\",\n \"name\": \"add_three\",\n \"doc\": \"Add three Ints.\",\n \"type\": {\n \"k\": \"fn\",\n \"params\": [\n { \"k\": \"con\", \"name\": \"Int\" },\n { \"k\": \"con\", \"name\": \"Int\" },\n { \"k\": \"con\", \"name\": \"Int\" }\n ],\n \"ret\": { \"k\": \"con\", \"name\": \"Int\" },\n \"effects\": []\n },\n \"params\": [\"a\", \"b\", \"c\"],\n \"body\": {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"+\" },\n \"args\": [\n {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"+\" },\n \"args\": [\n { \"t\": \"var\", \"name\": \"a\" },\n { \"t\": \"var\", \"name\": \"b\" }\n ]\n },\n { \"t\": \"var\", \"name\": \"c\" }\n ]\n }\n },\n {\n \"kind\": \"fn\",\n \"name\": \"main\",\n \"doc\": \"Print add_three(1, 2, 3) and add_three(10, 20, 30) on separate lines.\",\n \"type\": {\n \"k\": \"fn\",\n \"params\": [],\n \"ret\": { \"k\": \"con\", \"name\": \"Unit\" },\n \"effects\": [\"IO\"]\n },\n \"params\": [],\n \"body\": {\n \"t\": \"seq\",\n \"lhs\": {\n \"t\": \"do\",\n \"op\": \"io/print_int\",\n \"args\": [\n {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"add_three\" },\n \"args\": [\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 1 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 2 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 3 } }\n ]\n }\n ]\n },\n \"rhs\": {\n \"t\": \"seq\",\n \"lhs\": {\n \"t\": \"do\",\n \"op\": \"io/print_int\",\n \"args\": [\n {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"add_three\" },\n \"args\": [\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 10 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 20 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 30 } }\n ]\n }\n ]\n },\n \"rhs\": {\n \"t\": \"do\",\n \"op\": \"io/print_int\",\n \"args\": [\n {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"add_three\" },\n \"args\": [\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 1 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 2 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 3 } }\n ]\n }\n ]\n }\n }\n }\n }\n ]\n}",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 842,
|
||||||
|
"prompt_tokens": 9435,
|
||||||
|
"total_tokens": 10277
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
6
|
||||||
|
60
|
||||||
|
6
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parsing JSON in /tmp/cma2-run-tk0Cm9/prog.ail.json
|
||||||
+99
@@ -0,0 +1,99 @@
|
|||||||
|
{
|
||||||
|
"schema": "ailang/v0",
|
||||||
|
"name": "t1_add_three",
|
||||||
|
"imports": [],
|
||||||
|
"defs": [
|
||||||
|
{
|
||||||
|
"kind": "fn",
|
||||||
|
"name": "add_three",
|
||||||
|
"doc": "Add three Ints.",
|
||||||
|
"type": {
|
||||||
|
"k": "fn",
|
||||||
|
"params": [
|
||||||
|
{ "k": "con", "name": "Int" },
|
||||||
|
{ "k": "con", "name": "Int" },
|
||||||
|
{ "k": "con", "name": "Int" }
|
||||||
|
],
|
||||||
|
"ret": { "k": "con", "name": "Int" },
|
||||||
|
"effects": []
|
||||||
|
},
|
||||||
|
"params": ["a", "b", "c"],
|
||||||
|
"body": {
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "+" },
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "+" },
|
||||||
|
"args": [
|
||||||
|
{ "t": "var", "name": "a" },
|
||||||
|
{ "t": "var", "name": "b" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ "t": "var", "name": "c" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "fn",
|
||||||
|
"name": "main",
|
||||||
|
"doc": "Print add_three(1, 2, 3) and add_three(10, 20, 30) on separate lines.",
|
||||||
|
"type": {
|
||||||
|
"k": "fn",
|
||||||
|
"params": [],
|
||||||
|
"ret": { "k": "con", "name": "Unit" },
|
||||||
|
"effects": ["IO"]
|
||||||
|
},
|
||||||
|
"params": [],
|
||||||
|
"body": {
|
||||||
|
"t": "seq",
|
||||||
|
"lhs": {
|
||||||
|
"t": "do",
|
||||||
|
"op": "io/print_int",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "add_three" },
|
||||||
|
"args": [
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 1 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 2 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 3 } }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rhs": {
|
||||||
|
"t": "seq",
|
||||||
|
"lhs": {
|
||||||
|
"t": "do",
|
||||||
|
"op": "io/print_int",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "add_three" },
|
||||||
|
"args": [
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 10 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 20 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 30 } }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rhs": {
|
||||||
|
"t": "do",
|
||||||
|
"op": "io/print_int",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "add_three" },
|
||||||
|
"args": [
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 1 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 2 } },
|
||||||
|
{ "t": "lit": { "kind": "int", "value": 3 } }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
+18
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "{\n \"schema\": \"ailang/v0\",\n \"name\": \"t1_add_three\",\n \"imports\": [],\n \"defs\": [\n {\n \"kind\": \"fn\",\n \"name\": \"add_three\",\n \"doc\": \"Add three Ints.\",\n \"type\": {\n \"k\": \"fn\",\n \"params\": [\n { \"k\": \"con\", \"name\": \"Int\" },\n { \"k\": \"con\", \"name\": \"Int\" },\n { \"k\": \"con\", \"name\": \"Int\" }\n ],\n \"ret\": { \"k\": \"con\", \"name\": \"Int\" },\n \"effects\": []\n },\n \"params\": [\"a\", \"b\", \"c\"],\n \"body\": {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"+\" },\n \"args\": [\n {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"+\" },\n \"args\": [\n { \"t\": \"var\", \"name\": \"a\" },\n { \"t\": \"var\", \"name\": \"b\" }\n ]\n },\n { \"t\": \"var\", \"name\": \"c\" }\n }\n },\n {\n \"kind\": \"fn\",\n \"name\": \"main\",\n \"doc\": \"Print add_three(1, 2, 3) and add_three(10, 20, 30) on separate lines.\",\n \"type\": {\n \"k\": \"fn\",\n \"params\": [],\n \"ret\": { \"k\": \"con\", \"name\": \"Unit\" },\n \"effects\": [\"IO\"]\n },\n \"params\": [],\n \"body\": {\n \"t\": \"seq\",\n \"lhs\": {\n \"t\": \"do\",\n \"op\": \"io/print_int\",\n \"args\": [\n {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"add_three\" },\n \"args\": [\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 1 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 2 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 3 } }\n ]\n }\n }\n },\n \"rhs\": {\n \"t\": \"seq\",\n \"lhs\": {\n \"t\": \"do\",\n \"op\": \"io/print_int\",\n \"args\": [\n {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"add_three\" },\n \"args\": [\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 10 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 20 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 30 } }\n ]\n }\n },\n \"rhs\": {\n \"t\": \"do\",\n \"op\": \"io/print_int\",\n \"args\": [\n {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"add_three\" },\n \"args\": [\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 1 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 2 } },\n { \"t\": \"lit\": { \"kind\": \"int\", \"value\": 3 } }\n ]\n }\n ]\n }\n }\n }\n }\n ]\n}",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 835,
|
||||||
|
"prompt_tokens": 10306,
|
||||||
|
"total_tokens": 11141
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
parsing JSON in /tmp/cma2-run-3tQmlG/prog.ail.json
|
||||||
+83
@@ -0,0 +1,83 @@
|
|||||||
|
{
|
||||||
|
"schema": "ailang/v0",
|
||||||
|
"name": "t1_add_three",
|
||||||
|
"imports": [],
|
||||||
|
"defs": [
|
||||||
|
{
|
||||||
|
"kind": "fn",
|
||||||
|
"name": "add_three",
|
||||||
|
"doc": "Add three Ints.",
|
||||||
|
"type": {
|
||||||
|
"k": "fn",
|
||||||
|
"params": [
|
||||||
|
{ "k": "con", "name": "Int" },
|
||||||
|
{ "k": "con", "name": "Int" },
|
||||||
|
{ "k": "con", "name": "Int" }
|
||||||
|
],
|
||||||
|
"ret": { "k": "con", "name": "Int" },
|
||||||
|
"effects": []
|
||||||
|
},
|
||||||
|
"params": ["a", "b", "c"],
|
||||||
|
"body": {
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "+" },
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "+" },
|
||||||
|
"args": [
|
||||||
|
{ "t": "var", "name": "a" },
|
||||||
|
{ "t": "var", "name": "b" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ "t": "var", "name": "c" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "fn",
|
||||||
|
"name": "main",
|
||||||
|
"doc": "Print add_three(1, 2, 3) and add_three(10, 20, 30) on separate lines.",
|
||||||
|
"type": {
|
||||||
|
"k": "fn",
|
||||||
|
"params": [],
|
||||||
|
"ret": { "k": "con", "name": "Unit" },
|
||||||
|
"effects": ["IO"]
|
||||||
|
},
|
||||||
|
"params": [],
|
||||||
|
"body": {
|
||||||
|
"t": "seq",
|
||||||
|
"lhs": {
|
||||||
|
"t": "do",
|
||||||
|
"op": "io/print_int",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "add_three" },
|
||||||
|
"args": [
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 1 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 2 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 3 } }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rhs": {
|
||||||
|
"t": "do",
|
||||||
|
"op": "io/print_int",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"t": "app",
|
||||||
|
"fn": { "t": "var", "name": "add_three" },
|
||||||
|
"args": [
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 10 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 20 } },
|
||||||
|
{ "t": "lit", "lit": { "kind": "int", "value": 30 } }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
+26
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"content": "{\n \"schema\": \"ailang/v0\",\n \"name\": \"t1_add_three\",\n \"imports\": [],\n \"defs\": [\n {\n \"kind\": \"fn\",\n \"name\": \"add_three\",\n \"doc\": \"Add three Ints.\",\n \"type\": {\n \"k\": \"fn\",\n \"params\": [\n { \"k\": \"con\", \"name\": \"Int\" },\n { \"k\": \"con\", \"name\": \"Int\" },\n { \"k\": \"con\", \"name\": \"Int\" }\n ],\n \"ret\": { \"k\": \"con\", \"name\": \"Int\" },\n \"effects\": []\n },\n \"params\": [\"a\", \"b\", \"c\"],\n \"body\": {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"+\" },\n \"args\": [\n {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"+\" },\n \"args\": [\n { \"t\": \"var\", \"name\": \"a\" },\n { \"t\": \"var\", \"name\": \"b\" }\n ]\n },\n { \"t\": \"var\", \"name\": \"c\" }\n ]\n }\n },\n {\n \"kind\": \"fn\",\n \"name\": \"main\",\n \"doc\": \"Print add_three(1, 2, 3) and add_three(10, 20, 30) on separate lines.\",\n \"type\": {\n \"k\": \"fn\",\n \"params\": [],\n \"ret\": { \"k\": \"con\", \"name\": \"Unit\" },\n \"effects\": [\"IO\"]\n },\n \"params\": [],\n \"body\": {\n \"t\": \"seq\",\n \"lhs\": {\n \"t\": \"do\",\n \"op\": \"io/print_int\",\n \"args\": [\n {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"add_three\" },\n \"args\": [\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 1 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 2 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 3 } }\n ]\n }\n }\n },\n \"rhs\": {\n \"t\": \"do\",\n \"op\": \"io/print_int\",\n \"args\": [\n {\n \"t\": \"app\",\n \"fn\": { \"t\": \"var\", \"name\": \"add_three\" },\n \"args\": [\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 10 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 20 } },\n { \"t\": \"lit\", \"lit\": { \"kind\": \"int\", \"value\": 30 } }\n ]\n }\n ]\n }\n }\n }\n ]\n}",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 686,
|
||||||
|
"prompt_tokens": 11181,
|
||||||
|
"total_tokens": 11867
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user