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 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
parsing JSON in /tmp/cma2-run-GqvKXs/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 } }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+34
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": 11907,
|
||||
"total_tokens": 12593
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user