diff --git a/README.md b/README.md index eb3b3d8..529d420 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,10 @@ single runnable tour. - **No imports, no standard library.** A program is one unit; units compose by concatenation. Output is the host word `write 1 buf offset count`, which is why each task carries `emit`/`emitu` helpers. +## Benchmark + +- [`bench/`](bench/): a MultiPL-E adapter for Omega. It translates HumanEval (129/164) and MBPP (272/400) into OM-2 prompts and tests, and grades completions with the pinned `omc`. It includes 10 hand solutions and the gates (`sh bench/check.sh --omc PATH`). See [bench/README.md](bench/README.md). + ## Rosetta Code drafts [`drafts/rosettacode/`](drafts/rosettacode/) holds one ready-to-paste `.wiki` section per task and diff --git a/bench/.gitattributes b/bench/.gitattributes new file mode 100644 index 0000000..7a948c3 --- /dev/null +++ b/bench/.gitattributes @@ -0,0 +1 @@ +upstream/*.patch -text diff --git a/bench/.gitignore b/bench/.gitignore new file mode 100644 index 0000000..c18dd8d --- /dev/null +++ b/bench/.gitignore @@ -0,0 +1 @@ +__pycache__/ diff --git a/bench/DEPENDENCIES.md b/bench/DEPENDENCIES.md new file mode 100644 index 0000000..04c06ce --- /dev/null +++ b/bench/DEPENDENCIES.md @@ -0,0 +1,20 @@ +# bench/ dependencies + +`bench/` is a foreign-harness adapter. MultiPL-E's plugin API is Python classes and +modules, so the adapter is Python. It is not first-party Omega and is outside every +Omega product path: omc, the seed and shipped `.om` programs use none of it. + +| dependency | version | what it does here | Omega replacement | +|---|---|---|---| +| CPython | 3.12.3 (standard library only) | Runs the translator, evaluator, stub model, scorer and prompt builder. | None planned. MultiPL-E loads `humaneval_to_.py` and `eval_.py` as Python, so the adapter must be Python. The graded programs are plain OM-2. | +| MultiPL-E | `3025a531af7450e7df8b96fe0440e9804480bbad` (BSD 3-Clause with a Machine Learning Restriction) | `generic_translator.py`, `base_language_translator.py`, `terms.csv` and the HumanEval/MBPP originals. `build_prompts.py` copies them into `bench/build/` at run time; no MultiPL-E file is committed here. | None. It is the benchmark being adapted to. | +| omc | omega-mv `e5b32567a7aff3ce594e3254a622a846a6cd190b`, sha256 `2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f` (`omega.ref`) | Compiles every graded program. | First-party Omega already; used unmodified. | +| POSIX sh, awk, sha256sum, git | host versions | `check.sh`: pin check and the prompts-rebuild diff. | Verification tooling only. | +| Linux AArch64 | kernel with the AArch64 Linux ABI | Runs omc's static executables. | None needed. An x86-64 host would need qemu-user; that path is NOT_RUN. | + +The adapter does not use numpy, `datasets` or `tqdm`. pass@k reimplements +MultiPL-E's `pass_k.estimator` in plain Python. + +MultiPL-E's own `prepare_prompts_for_hfhub.py` imports `datasets`, so the +`upstream/` notes record a separate check with it in a throwaway venv. That is a +verification step only; nothing in `bench/` imports it. diff --git a/bench/README.md b/bench/README.md new file mode 100644 index 0000000..bf0bff9 --- /dev/null +++ b/bench/README.md @@ -0,0 +1,191 @@ +# MultiPL-E for Omega + +`bench/` adapts [MultiPL-E](https://github.com/nuprl/MultiPL-E) (pinned at +`3025a531af7450e7df8b96fe0440e9804480bbad`) to Omega's OM-2 profile. It turns the +HumanEval and MBPP problems into Omega prompts plus test programs and grades +completions with the pinned `omc` (`omega.ref`). + +Status: IMPLEMENTED, and EXERCISED on a Linux AArch64 host (the DGX Spark's Grace +cores) with the stub model below. No language model has been evaluated yet, so no +model pass@k exists. + +## Not first-party Omega + +All Python here (`multipl-e/*.py`, `stub_model.py`, `score.py`) is a +**foreign-harness adapter**. MultiPL-E loads translators as Python classes +(`dataset_builder/humaneval_to_.py`) and evaluators as Python modules +(`evaluation/src/eval_.py`), so its plugin API can only be met in Python. +None of this code is first-party Omega. It sits outside every Omega product +path: nothing in omc, the seed or any shipped `.om` program depends on it. The +programs it writes are plain OM-2 compiled by the unmodified pinned omc. +`DEPENDENCIES.md` lists what it needs. + +## Layout + +| path | what | +|---|---| +| `multipl-e/humaneval_to_om.py` | The MultiPL-E `Translator` for Omega (`.om`). | +| `multipl-e/eval_om.py` | The MultiPL-E evaluator. `eval_script(path)` returns the MultiPL-E result dict. | +| `multipl-e/build_prompts.py` | Runs the translator through the pinned MultiPL-E `generic_translator`. It writes `prompts/`. | +| `prompts/{humaneval,mbpp}-om.jsonl` | The translated problems (name, language, prompt, tests, stop_tokens, …). | +| `prompts/*.coverage.json`, `prompts/COVERAGE.md` | Each problem's translation result, with a reason for every refusal. | +| `solutions/HumanEval_.om` | Ten hand-written completions: function bodies up to and including `end`. | +| `stub_model.py` | Writes MultiPL-E completion files without a model. | +| `score.py` | Evaluates completion files and writes `.results.json` and `summary.json` (pass@k). | +| `check.sh` | The gates. | +| `results//` | The completions, results and summary from the last `check.sh` run. | +| `upstream/` | A prepared contribution to nuprl/MultiPL-E. It is **not submitted**. | + +## Translation + +Each problem becomes: + +``` +om2 +note +note +fn NAME PARAM TYPE ... to TYPE + + +``` + +| Python | Omega | +|---|---| +| `int` | `long` | +| `float` | `f64` | +| `bool` | `bool` | +| `List[int]` / `List[float]` | `view long *` / `view f64 *` | +| `str` | `view uchar *` (bytes; a non-ASCII test string is refused) | +| `Tuple[int, int]`, `Tuple[float, float]` (homogeneous) | `view long *` / `view f64 *` | +| list, string or tuple **result** | an extra last parameter `res edit T *`; the function returns the element count as `long` | + +The tests become one `fn tc_K to bool` per assertion, then `fn main`. + +- `main` returns `K+1` for the first failing case K. A translation holds at most + 98 cases, so this is 1..98. +- When every case holds, `main` writes the line `MultiPL-E Omega: all tests passed` + and returns 0. The evaluator requires exit 0 **and** that final line. A completion + that ends the process early with status 0 is therefore not a pass. +- A trap exits `100 + code`. +- Floats compare with exact `eq`, as MultiPL-E's Python tests compare with `==`. + +### Refusals + +The translator refuses a problem when OM-2 or the harness can't express it +faithfully. MultiPL-E then skips that problem. + +- **Types:** `List[str]`, `List[bool]` (omc has no bool arrays), nested or compound + lists, mixed tuples, `Optional`, `Union`, `Dict`, `Set`, `Any`, and unannotated or + `None` results. +- **Values:** a non-ASCII string, an int outside i64, or a non-finite float. +- **ABI:** more than 6 argument slots. +- **Tests:** more than 98 cases, or a test that calls something other than the + candidate. + +### Renaming + +The translator renames a name and adds a `note Omega name: X is Y here.` line +when the name: + +- is a keyword; +- collides with a harness name; +- is a parameter longer than omc's 8-character local limit; +- is a function name longer than 8 characters whose first 8 bytes spell an + 8-letter keyword, such as `truncate_number`. Function names in this case get + their first letter capitalised. + +## Coverage (MEASURED, `prompts/COVERAGE.md`) + +- **HumanEval: 129 of 164 translate.** MultiPL-E's originals already drop 3 of the + 164 (HumanEval_32, _38 and _50). Of its 161, the translator refuses 32: + `List[str]` 17, compound list 4, `Optional` 3, `Union` 3, mixed tuple 3, `Dict` 2. +- **MBPP (`mbpp-typed`): 272 of 400 translate; 128 are refused.** The largest + reasons are compound list 67, `List[str]` 22, mixed tuple 11 and `Dict` 10. + +## Running + +```sh +# prompts (needs a MultiPL-E clone at the pin; plain python3, no extra modules) +python3 bench/multipl-e/build_prompts.py --multipl-e ../MultiPL-E + +# completions -> results -> pass@1 +python3 bench/stub_model.py hand /tmp/run +OMEGA_OMC=/path/to/omc python3 bench/score.py /tmp/run + +# all gates +sh bench/check.sh --omc /path/to/omc [--multipl-e ../MultiPL-E] +``` + +`eval_om.py` reads these settings from the environment: + +- `OMEGA_OMC`: the omc path (required). +- `OMEGA_OMC_SHA256`: the pin. It defaults to `omega.ref`'s; on a mismatch the + evaluator raises and records nothing. +- `OMEGA_EVAL_TIMEOUT`: seconds per program (default 15). +- `OMEGA_EVAL_WRAP`: an optional command prefix, for example + `nice -n 19 taskset -c 10-14`. + +omc writes static AArch64 Linux executables, so evaluation needs an AArch64 Linux +host. An x86-64 host would need qemu-user, which is NOT_RUN. + +Outcome mapping: + +| outcome | `om_status` | MultiPL-E `status` | +|---|---|---| +| omc exits nonzero or writes to stderr; the output is never run | `compile_error` | `SyntaxError` | +| exit 0 and the final pass line | `pass` | `OK` | +| exit 1..98 | `wrong_answer`, `om_case` = exit − 1 | `Exception` | +| exit 100..199 | `trap`, `om_case` = trap code | `Exception` | +| exit 0 without the pass line | `no_pass_line` | `Exception` | +| any other exit or a signal | `exit_other` | `Exception` | +| over the time limit (the process group is killed) | `timeout` | `Timeout` | + +## Gates (`check.sh`) + +Each gate has a negative control that must be observed failing: + +| gate | passes when | negative control | +|---|---|---| +| `constants` | eval_om's pin equals `omega.ref`, and both files use the same pass line | a mismatch fails it | +| `prompts-rebuild` | rebuilding the prompts reproduces the committed files | a translator change fails it | +| `stub-sweep-{humaneval,mbpp}` | every translated problem compiles with the stub body `trap 14` and exits 114 in its first case | a broken test harness fails to compile or exits otherwise | +| `mode-hand` | the 10 hand solutions all reach `pass` | a deliberately broken solution is classified `wrong_answer` | +| `mode-wrong` | constant answers are all `wrong_answer` | — | +| `mode-invalid` | non-Omega text is always `compile_error` | — | +| `mode-trap` | `trap 5` is classified `trap` with case 5 | — | +| `mode-timeout` | a loop of about 2^72 steps is a `timeout` at 2 s | — | +| `pin-refusal` | eval_om refuses to evaluate when the omc hash is not the pin | — | +| `no-pass-line` | exit 0 without the pass line is not a pass | — | + +The `wrong`, `invalid`, `trap` and `timeout` modes are themselves the negative +controls for `mode-hand`. A grader that passed everything would fail them. + +The 10 hand solutions are HumanEval 0, 2, 3, 9, 13, 16, 27, 30, 48 and 53. They +cover these signatures: + +- `List[float]` → `bool` +- `float` → `float` +- `List[int]` → `bool` +- `List[int]` → `List[int]` (twice) +- `int` → `int` +- `str` → `int` +- `str` → `str` +- `str` → `bool` + +In the last run, pass@1 was 1.0 for `hand` and 0.0 for every other mode +(`results/*/summary.json`). With one completion per problem, pass@1 is c/n. The +values were checked with Wolfram (see the PR text in `upstream/`). + +## omc defects worked around (pin e5b32567) + +- **Keyword-prefix function names.** omc looks a function name up in the keyword + table by its first 8 bytes. A longer name that starts with an 8-letter keyword, + such as `truncate_number`, is refused with error 16 (`omc.om` `fn kw` caller near + line 6681). The translator renames such names. +- **Empty text passed to a view.** An empty `text ""` passed to an unsized `view` + parameter gives the callee a stale register as its length. `omc.om` arrarg takes + `nm_len 0` to mean an unsized parameter. The result was a garbage `len`, and a + segfault when the callee indexed the view. The translator passes `""` as + `part a 0 0` instead. + +Both are reported to the omega-mv omc owner. The pin is unchanged. diff --git a/bench/check.sh b/bench/check.sh new file mode 100755 index 0000000..1a526b9 --- /dev/null +++ b/bench/check.sh @@ -0,0 +1,100 @@ +#!/bin/sh +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# bench/check.sh: gates for the MultiPL-E Omega adapter (bench/README.md). +# +# sh bench/check.sh --omc PATH [--multipl-e DIR] +# +# PATH must hash to omc_sha256 in omega.ref. With --multipl-e (a MultiPL-E clone at +# MULTIPLE_E_PIN in bench/multipl-e/build_prompts.py) the prompts are rebuilt and must equal the +# committed ones; without it that gate prints NOT_RUN. Writes bench/results// (committed) +# and bench/build/. +# stdout: "PASS ", "FAIL ..." or "NOT_RUN ..." lines, then "BENCH PASS|FAIL". +# Exit 0 when no gate fails, 1 when one fails, 2 when setup fails. Linux AArch64 only. +set -u +bench=$(cd "$(dirname "$0")" && pwd) +root=$(dirname "$bench") +omc="${OMEGA_OMC:-}" +mpe="" +while [ $# -gt 0 ]; do + case "$1" in + --omc) omc="$2"; shift ;; + --multipl-e) mpe="$2"; shift ;; + *) echo "check.sh: unknown argument $1" >&2; exit 2 ;; + esac + shift +done +die() { echo "check.sh: $*" >&2; exit 2; } +pin=$(awk '$1=="omc_sha256"{print $2}' "$root/omega.ref") +[ -n "$pin" ] || die "omega.ref has no omc_sha256 line" +[ -n "$omc" ] && [ -f "$omc" ] || die "give --omc PATH (or OMEGA_OMC)" +got=$(sha256sum "$omc" | awk '{print $1}') +[ "$got" = "$pin" ] || die "omc sha256 $got does not match the pin $pin" +OMEGA_OMC=$omc; OMEGA_OMC_SHA256=$pin; export OMEGA_OMC OMEGA_OMC_SHA256 +work="$bench/build/check"; rm -rf "$work"; mkdir -p "$work" || die "cannot create $work" +fails=0 +pass() { echo "PASS $1"; } +fail() { echo "FAIL $*"; fails=$((fails + 1)); } + +# 1. The pin and the pass line are written in two files; they must agree. +if python3 - "$bench" "$pin" <<'EOF' +import sys +sys.path.insert(0, sys.argv[1] + "/multipl-e") +import eval_om, humaneval_to_om +ok = eval_om.PINNED_OMC_SHA256 == sys.argv[2] and eval_om.MPE_OK_LINE == humaneval_to_om.MPE_OK_LINE +sys.exit(0 if ok else 1) +EOF +then pass constants; else fail constants "eval_om pin or pass line differs"; fi + +# 2. The committed prompts are what the translator writes. +if [ -n "$mpe" ]; then + if python3 -W ignore "$bench/multipl-e/build_prompts.py" --multipl-e "$mpe" > "$work/build.log" 2>&1 \ + && git -C "$root" diff --quiet -- bench/prompts; then + pass prompts-rebuild + else + fail prompts-rebuild "see $work/build.log and git diff bench/prompts" + fi +else + echo "NOT_RUN prompts-rebuild (no --multipl-e)" +fi + +# 3. Every translated prompt and its tests compile: the stub body traps 14 in the first case. +for set in humaneval mbpp; do + python3 "$bench/stub_model.py" stub "$work/stub-$set" --prompts "$bench/prompts/$set-om.jsonl" >&2 \ + && python3 "$bench/score.py" --expect trap:14 "$work/stub-$set" > "$work/stub-$set.log" \ + && pass "stub-sweep-$set $(head -n 1 "$work/stub-$set.log")" \ + || fail "stub-sweep-$set" "$(grep FAIL "$work/stub-$set.log" | head -n 3)" +done + +# 4. Hand solutions pass; each negative control is classified as what it is. +for spec in hand:pass wrong:wrong_answer invalid:compile_error trap:trap:5 timeout:timeout; do + mode=${spec%%:*}; want=${spec#*:} + out="$bench/results/$mode"; rm -rf "$out" + python3 "$bench/stub_model.py" "$mode" "$out" >&2 || { fail "mode-$mode" "stub_model failed"; continue; } + t=15; [ "$mode" = timeout ] && t=2 + if OMEGA_EVAL_TIMEOUT=$t python3 "$bench/score.py" --expect "$want" "$out" > "$work/$mode.log"; then + pass "mode-$mode $want $(cat "$work/$mode.log" | head -n 1)" + else + fail "mode-$mode" "$(cat "$work/$mode.log")" + fi +done + +# 5. eval_om refuses an omc that is not the pin (negative control: a wrong pin). +printf 'om2\nfn main to int\nret 0\nend\n' > "$work/bare.om" +if OMEGA_OMC_SHA256=0000000000000000000000000000000000000000000000000000000000000000 \ + python3 "$bench/multipl-e/eval_om.py" "$work/bare.om" > "$work/pin.log" 2>&1; then + fail pin-refusal "eval_om ran with a wrong pin" +elif grep -q "refusing to evaluate" "$work/pin.log"; then + pass pin-refusal +else + fail pin-refusal "$(tail -n 1 "$work/pin.log")" +fi + +# 6. Exit 0 alone is not a pass: a program that never writes the pass line. +if python3 "$bench/multipl-e/eval_om.py" "$work/bare.om" | grep -q '"om_status": "no_pass_line"'; then + pass no-pass-line +else + fail no-pass-line "exit 0 without the pass line was not no_pass_line" +fi + +if [ "$fails" -eq 0 ]; then echo "BENCH PASS"; exit 0; fi +echo "BENCH FAIL ($fails)"; exit 1 diff --git a/bench/multipl-e/build_prompts.py b/bench/multipl-e/build_prompts.py new file mode 100755 index 0000000..dd7b00a --- /dev/null +++ b/bench/multipl-e/build_prompts.py @@ -0,0 +1,197 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +"""Translate MultiPL-E's Python benchmarks to Omega and report coverage. + +Foreign-harness adapter (see bench/DEPENDENCIES.md). It runs MultiPL-E's own +dataset_builder/generic_translator.py, at the pinned MultiPL-E commit, with +humaneval_to_om.Translator, exactly as prepare_prompts_for_hfhub.py would, but +without the Hugging Face `datasets` dependency, and it records WHY each refused +problem was refused. + + bench/multipl-e/build_prompts.py --multipl-e /path/to/MultiPL-E [--out bench/prompts] + +Writes, per benchmark: -om.jsonl (MultiPL-E prompt records) and +-om.coverage.json, plus COVERAGE.md summarising both. +""" + +import argparse +import collections +import contextlib +import importlib +import io +import json +import os +import shutil +import subprocess +import sys +from pathlib import Path + +HERE = Path(__file__).resolve().parent +BENCH = HERE.parent +MULTIPLE_E_PIN = "3025a531af7450e7df8b96fe0440e9804480bbad" +# The upstream HumanEval has 164 problems; MultiPL-E's originals keep 161 (it drops +# HumanEval_32, _38 and _50, whose tests call helpers outside the prompt). +UPSTREAM_SIZES = {"humaneval": 164, "mbpp": None} +# (benchmark, originals directory, doctests mode, prompt terminology): the +# configurations MultiPL-E publishes as humaneval- and mbpp-. +CONFIGS = [ + ("humaneval", "originals-with-cleaned-doctests", "transform", "reworded"), + ("mbpp", "mbpp-typed", "transform", "reworded"), +] +# Columns: name, ext, list, array, tuple, dictionary, None, True, False. Omega has no +# dictionary or None value; problems that use them are refused, so those words never land. +TERMS_ROW = "Omega,om,array,array,array,dictionary,none,true,false\n" + + +def pinned_multiple_e(root: Path) -> None: + head = subprocess.run( + ["git", "-C", str(root), "rev-parse", "HEAD"], capture_output=True, text=True, check=True + ).stdout.strip() + if head != MULTIPLE_E_PIN: + sys.exit(f"build_prompts: MultiPL-E at {head}, pin is {MULTIPLE_E_PIN}; refusing") + + +def workdir(root: Path) -> Path: + """A scratch dataset_builder: MultiPL-E's translator modules plus ours, and + terms.csv with the Omega row (generic_translator reads ./terms.csv on import).""" + wd = BENCH / "build" / "dataset_builder" + if wd.exists(): + shutil.rmtree(wd) + wd.mkdir(parents=True) + for f in ("generic_translator.py", "base_language_translator.py", "terms.csv"): + shutil.copy(root / "dataset_builder" / f, wd / f) + shutil.copy(HERE / "humaneval_to_om.py", wd / "humaneval_to_om.py") + terms = (wd / "terms.csv").read_text() + if "\nOmega,om," not in terms: + (wd / "terms.csv").write_text(terms.rstrip("\n") + "\n" + TERMS_ROW) + return wd + + +def reason_from_log(log: str) -> str: + if "Failed to translate tests" in log: + return "tests:not all asserts are `assert f(...) == v` (MultiPL-E generic translator)" + if "Conflicting tests" in log: + return "tests:conflicting duplicate asserts" + if "Exception translating prompt" in log: + return "prompt:docstring or doctest not parseable (MultiPL-E generic translator)" + if "Exception translating test case" in log: + return "tests:expression outside MultiPL-E's literal grammar" + if "No tests were translated" in log: + return "tests:none" + return "unknown" + + +def build(root: Path, out: Path) -> dict: + pinned_multiple_e(root) + wd = workdir(root) + cwd = os.getcwd() + os.chdir(wd) + sys.path.insert(0, str(wd)) + try: + gt = importlib.import_module("generic_translator") + om = importlib.import_module("humaneval_to_om") + summary = {} + for bench, originals, doctests, terminology in CONFIGS: + translator = om.Translator() + files = sorted( + (root / "datasets" / originals).glob("*.py"), + key=lambda p: int(p.name.split("_")[1]), + ) + records, rows = [], [] + for f in files: + name = f.name[: -len(".py")] + buf = io.StringIO() + with contextlib.redirect_stdout(buf), contextlib.redirect_stderr(buf): + result = gt.translate_prompt_and_tests(f, translator, doctests, terminology) + if result is None: + r = translator.refusal + code = r.code if r is not None else reason_from_log(buf.getvalue()) + detail = r.detail if r is not None else "" + rows.append({"name": name, "translated": False, "reason": code, "detail": detail}) + continue + prompt, tests = result + records.append( + { + "name": name, + "language": translator.file_ext(), + "prompt": prompt, + "doctests": doctests, + "original": f"datasets/{originals}/{f.name}", + "prompt_terminology": terminology, + "tests": tests, + "stop_tokens": gt.get_stop_from_translator(translator), + } + ) + rows.append({"name": name, "translated": True, "cases": len(translator.cases)}) + with open(out / f"{bench}-om.jsonl", "w") as fh: + for rec in records: + fh.write(json.dumps(rec) + "\n") + reasons = collections.Counter(r["reason"] for r in rows if not r["translated"]) + cov = { + "benchmark": bench, + "originals": f"datasets/{originals}", + "multipl_e_commit": MULTIPLE_E_PIN, + "omega_mv_pin": om.OMEGA_MV_PIN, + "doctests": doctests, + "prompt_terminology": terminology, + "upstream_size": UPSTREAM_SIZES[bench], + "originals_count": len(files), + "translated": len(records), + "refused": len(files) - len(records), + "reasons": dict(reasons.most_common()), + "problems": rows, + } + with open(out / f"{bench}-om.coverage.json", "w") as fh: + json.dump(cov, fh, indent=1) + fh.write("\n") + summary[bench] = cov + return summary + finally: + os.chdir(cwd) + sys.path.remove(str(wd)) + + +def coverage_md(summary: dict) -> str: + lines = [ + "# MultiPL-E Omega coverage", + "", + "Generated by `bench/multipl-e/build_prompts.py`; do not edit by hand.", + f"MultiPL-E `{MULTIPLE_E_PIN}`, omega-mv pin `{next(iter(summary.values()))['omega_mv_pin']}`.", + "", + ] + for bench, cov in summary.items(): + up = cov["upstream_size"] + lines.append(f"## {bench}") + lines.append("") + if up: + lines.append( + f"{cov['translated']} of {up} translate ({up - cov['originals_count']} are already " + f"dropped by MultiPL-E's originals, {cov['refused']} of its {cov['originals_count']} are refused here)." + ) + else: + lines.append(f"{cov['translated']} of {cov['originals_count']} translate; {cov['refused']} refused.") + lines += ["", "| refusal reason | problems |", "|---|---|"] + for reason, n in cov["reasons"].items(): + lines.append(f"| `{reason}` | {n} |") + lines.append("") + return "\n".join(lines) + + +def main(): + ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + ap.add_argument("--multipl-e", default=os.environ.get("MULTIPL_E"), help="MultiPL-E checkout at the pin") + ap.add_argument("--out", default=str(BENCH / "prompts")) + args = ap.parse_args() + if not args.multipl_e: + sys.exit("build_prompts: pass --multipl-e DIR or set MULTIPL_E") + out = Path(args.out) + out.mkdir(parents=True, exist_ok=True) + summary = build(Path(args.multipl_e).resolve(), out) + (out / "COVERAGE.md").write_text(coverage_md(summary)) + for bench, cov in summary.items(): + print(f"{bench}: {cov['translated']}/{cov['upstream_size'] or cov['originals_count']} translated " + f"({cov['originals_count']} originals, {cov['refused']} refused)") + + +if __name__ == "__main__": + main() diff --git a/bench/multipl-e/eval_om.py b/bench/multipl-e/eval_om.py new file mode 100755 index 0000000..0645893 --- /dev/null +++ b/bench/multipl-e/eval_om.py @@ -0,0 +1,143 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +"""MultiPL-E evaluator for Omega programs written by humaneval_to_om.py. + +Foreign-harness adapter: MultiPL-E calls ``eval_script(path)`` from +``evaluation/src/eval_.py``, so this file is Python. It is not first-party +Omega and is not part of any Omega product path. Pure standard library. + + OMEGA_OMC=/path/to/omc eval_om.py PROGRAM.om [...] # one JSON result per line + +Compile protocol (pinned omc): ``omc < p.om > p 2> p.err``. Only when omc exits +0 with nothing on stderr is ``p`` made executable and run. The omc file must hash +to OMEGA_OMC_SHA256 (default: the omega-rosetta pin); a mismatch raises before +anything is compiled, so no result is ever recorded against an unpinned compiler. + +Outcome -> MultiPL-E ``status`` (``om_status``, ``om_case``): + + omc nonzero / stderr SyntaxError compile_error omc error code + exit 0 + pass line OK pass - + exit 0 without pass line Exception no_pass_line - + exit 1..98 Exception wrong_answer failing test case (exit - 1) + exit 100..199 Exception trap trap code (exit - 100) + other exit / signal Exception exit_other exit code + over the time limit Timeout timeout - + +MultiPL-E's containerized_eval keeps only status/exit_code/stdout/stderr; the +om_* fields are derivable from exit_code by the table above. +""" + +import hashlib +import json +import os +import re +import shlex +import signal +import subprocess +import sys +import tempfile +from pathlib import Path + +# Pin of aien-dev/omega-rosetta omega.ref (omega-mv e5b32567a7aff3ce594e3254a622a846a6cd190b). +PINNED_OMC_SHA256 = "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f" +# Must equal humaneval_to_om.MPE_OK_LINE: the line main writes after the last case holds. +MPE_OK_LINE = "MultiPL-E Omega: all tests passed" +COMPILE_TIMEOUT = 30 +MAX_OUTPUT = 2048 +_ERROR_RE = re.compile(r"omc: line (\d+): error (\d+)") +_checked = {} + + +def omc_path(omc=None) -> str: + omc = omc or os.environ.get("OMEGA_OMC") + if not omc: + raise RuntimeError("eval_om: set OMEGA_OMC to the pinned omc binary") + return omc + + +def check_pin(omc: str) -> None: + """Raise unless the omc file hashes to the pin. Cached by (path, size, mtime).""" + st = os.stat(omc) + key = (os.path.realpath(omc), st.st_size, st.st_mtime_ns) + want = os.environ.get("OMEGA_OMC_SHA256", PINNED_OMC_SHA256) + if _checked.get(key) == want: + return + h = hashlib.sha256() + with open(omc, "rb") as f: + for chunk in iter(lambda: f.read(1 << 20), b""): + h.update(chunk) + got = h.hexdigest() + if got != want: + raise RuntimeError(f"eval_om: {omc} has sha256 {got}, pin is {want}; refusing to evaluate") + _checked[key] = want + + +def _wrap() -> list: + """Optional command prefix for omc and the program, e.g. 'nice -n 19 taskset -c 10-14'.""" + return shlex.split(os.environ.get("OMEGA_EVAL_WRAP", "")) + + +def _run(argv, timeout, stdin=None, stdout=subprocess.PIPE): + """Run argv in its own process group; kill the group on timeout. + Returns (exit_code or None on timeout, stdout bytes, stderr bytes).""" + p = subprocess.Popen( + argv, stdin=stdin or subprocess.DEVNULL, stdout=stdout, stderr=subprocess.PIPE, start_new_session=True + ) + try: + out, err = p.communicate(timeout=timeout) + return p.returncode, out or b"", err or b"" + except subprocess.TimeoutExpired: + os.killpg(p.pid, signal.SIGKILL) + out, err = p.communicate() + return None, out or b"", err or b"" + + +def _text(b: bytes) -> str: + return b[:MAX_OUTPUT].decode("utf-8", errors="replace") + + +def eval_script(path: Path, omc=None, timeout=None) -> dict: + omc = omc_path(omc) + check_pin(omc) + if timeout is None: + timeout = float(os.environ.get("OMEGA_EVAL_TIMEOUT", "15")) + with tempfile.TemporaryDirectory(prefix="eval_om.") as d: + exe = os.path.join(d, "p") + with open(path, "rb") as src, open(exe, "wb") as dst: + rc, _, err = _run(_wrap() + [omc], COMPILE_TIMEOUT, stdin=src, stdout=dst) + if rc is None: + return {"status": "Timeout", "exit_code": -1, "stdout": "", "stderr": "omc timeout", + "om_status": "timeout", "om_case": None} + if rc != 0 or err: + m = _ERROR_RE.search(err.decode("utf-8", errors="replace")) + return {"status": "SyntaxError", "exit_code": rc, "stdout": "", "stderr": _text(err), + "om_status": "compile_error", "om_case": int(m.group(2)) if m else None} + os.chmod(exe, 0o700) + rc, out, err = _run(_wrap() + [exe], timeout) + result = {"exit_code": rc if rc is not None else -1, "stdout": _text(out), "stderr": _text(err)} + if rc is None: + result.update(status="Timeout", om_status="timeout", om_case=None) + elif rc == 0 and out.endswith((MPE_OK_LINE + "\n").encode()): + result.update(status="OK", om_status="pass", om_case=None) + elif rc == 0: + result.update(status="Exception", om_status="no_pass_line", om_case=None) + elif 1 <= rc <= 98: + result.update(status="Exception", om_status="wrong_answer", om_case=rc - 1) + elif 100 <= rc <= 199: + result.update(status="Exception", om_status="trap", om_case=rc - 100) + else: + result.update(status="Exception", om_status="exit_other", om_case=rc) + return result + + +def main(argv): + if not argv or argv[0] in ("-h", "--help"): + print(__doc__) + return 0 if argv else 2 + for p in argv: + print(json.dumps({"path": p, **eval_script(Path(p))})) + return 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff --git a/bench/multipl-e/humaneval_to_om.py b/bench/multipl-e/humaneval_to_om.py new file mode 100644 index 0000000..9e7c4a3 --- /dev/null +++ b/bench/multipl-e/humaneval_to_om.py @@ -0,0 +1,445 @@ +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +"""MultiPL-E translator from the Python benchmarks to Omega (OM-2 profile). + +Foreign-harness adapter: MultiPL-E loads translators as Python classes named +``Translator`` in ``dataset_builder/humaneval_to_.py``, so this file is Python. It +is not first-party Omega and is not part of any Omega product path. Every +program it writes is plain OM-2 for the pinned ``omc`` (see ``bench/README.md`` in +https://github.com/aien-dev/omega-rosetta). + +Shape of a translated problem:: + + om2 + note + note + fn NAME PARAM TYPE ... to TYPE + + + +``main`` returns K+1 when test case K fails (so 1..98), writes the line +``MPE_OK_LINE`` and returns 0 when every case holds. A trap exits 100+code. + +Type mapping:: + + int -> long float -> f64 bool -> bool + List[int] -> view long * List[float] -> view f64 * + str -> view uchar * (bytes; non-ASCII test strings are refused) + Tuple[int, int] (homogeneous int/float) -> view long * / view f64 * + +A list, string or tuple RESULT becomes an extra last parameter ``res edit T *`` and +the function returns the element count as ``long``; the test checks the count and +then every element. Every other type is refused with a reason (``translate_prompt`` +returns None and ``self.refusal`` names why). +""" + +import ast +import math +import re +from typing import List, Optional + +# omega-mv commit whose pinned omc defines this profile. +OMEGA_MV_PIN = "e5b32567a7aff3ce594e3254a622a846a6cd190b" + +# Every word of the pinned omc keyword tables (seed/omc/omc.om `fn kw` and +# `fn kw2` at OMEGA_MV_PIN, decoded from their packed little-endian constants). +# A parameter or function may not use any of these as its name. +KEYWORDS = frozenset( + """ + abstract accept add and argcnt argread at big bind bitcast bool bound break byte + chdir chmod chown connect const continue cwd devcall devctl div dupfd edit else + end envcnt envread eq execprog exit export f32 f64 fabs faccess false fchdir + fchmod fclose fdsync field flock fmax fmin fn fopen for fork free fresh fseek + fsqrt fstat fsync ftrunc ge get getdnts getegid geteuid getgid getpgid getpid + getppid getsid getuid global gt holds i16 i32 i64 i8 if inline int killpid + layout le len link listen little long lstat lt makedir mapaddr mapbind mapdrop + mapget maphold mapnew mapread mapset mapwrite memfd monons mul ne neg new not + note offsetof open ops or out own part peercred pipefds pollfds pread put pwrite + random read readlnk realns recv rem renames ret rmdir rotl rotr seal send + sendmsg setpgid setsid shl short shr shutdown sizeof sleepns sockname socknew + sockopt stat struct sub symlnk syncfs text to trap true truncate u16 u32 u64 u8 + uchar uint ulong umask unlink unroll ushort uvmctl view void waitio waitpid + while write xor + """.split() +) +# Names the generated test harness itself declares. +HARNESS_NAMES = frozenset(["main", "res", "r", "w", "mpe_ok", "om2", "ir"]) +HARNESS_NAME_RE = re.compile(r"(tc_\d+|t\d+_\d+|a\d+)\Z") + +MAX_LOCAL = 8 # error 13: a non-function name has at most 8 characters +MAX_FN = 63 # function names +MAX_SLOTS = 6 # error 9: six parameter slots; an unsized view takes two +MAX_CASES = 98 # exit codes 1..98 name the failing case; 100+ are traps +RESULT_CAP = 4096 # minimum capacity of the result array handed to the candidate +I64_MIN, I64_MAX = -(2**63), 2**63 - 1 +MPE_OK_LINE = "MultiPL-E Omega: all tests passed" + + +class Refused(Exception): + """A problem the OM-2 mapping cannot express. ``code`` is the tally key.""" + + def __init__(self, code: str, detail: str = ""): + super().__init__(f"{code}: {detail}" if detail else code) + self.code = code + self.detail = detail + + +class Scalar: + def __init__(self, om: str): + self.om = om # long | f64 | bool + + slots = 1 + + def __repr__(self): + return self.om + + +class Seq: + """A list, string or fixed tuple: an unsized view of `elem`.""" + + def __init__(self, elem: str, py: str, fixed: Optional[int] = None): + self.elem = elem # long | f64 | uchar + self.py = py # list | str | tuple + self.fixed = fixed + + slots = 2 + + def __repr__(self): + return f"view {self.elem} *" + + +SCALARS = {"int": "long", "float": "f64", "bool": "bool"} +SEQ_ELEMS = {"int": "long", "float": "f64"} + + +def _head(node: ast.expr) -> str: + if isinstance(node, ast.Name): + return node.id + if isinstance(node, ast.Attribute): + return node.attr + return type(node).__name__ + + +def om_type(ann: Optional[ast.expr]): + """Map one Python annotation to Scalar/Seq, or raise Refused.""" + if ann is None: + raise Refused("type:untyped", "parameter or return has no annotation") + text = ast.unparse(ann) + if isinstance(ann, ast.Constant) and ann.value is None: + raise Refused("type:None", "no result value to test") + if isinstance(ann, ast.Name): + if ann.id in SCALARS: + return Scalar(SCALARS[ann.id]) + if ann.id == "str": + return Seq("uchar", "str") + raise Refused(f"type:{ann.id}", text) + if isinstance(ann, ast.Subscript): + head = _head(ann.value) + if head in ("List", "list"): + inner = ann.slice + if isinstance(inner, ast.Name) and inner.id in SEQ_ELEMS: + return Seq(SEQ_ELEMS[inner.id], "list") + if isinstance(inner, ast.Name) and inner.id == "str": + raise Refused("type:List[str]", "OM-2 has no array-of-strings type") + if isinstance(inner, ast.Name) and inner.id == "bool": + raise Refused("type:List[bool]", "omc refuses bool arrays (new bool N, error 9)") + raise Refused("type:List[compound]", text) + if head in ("Tuple", "tuple"): + elts = ann.slice.elts if isinstance(ann.slice, ast.Tuple) else [ann.slice] + names = [e.id if isinstance(e, ast.Name) else None for e in elts] + if len(set(names)) == 1 and names[0] in SEQ_ELEMS: + return Seq(SEQ_ELEMS[names[0]], "tuple", fixed=len(elts)) + raise Refused("type:Tuple[mixed]", text) + raise Refused(f"type:{head}", text) + raise Refused("type:other", text) + + +def _name_ok(name: str, used: set) -> bool: + return ( + name not in KEYWORDS + # The pinned omc looks a word up in its keyword table by its first eight bytes + # only (omc.om `fn kw` takes one packed ulong), so it reads a longer name such as + # truncate_number or continue_x as the keyword truncate / continue (error 16). + and name[:8] not in KEYWORDS + and name not in HARNESS_NAMES + and name not in used + and not HARNESS_NAME_RE.match(name) + ) + + +def fit_name(py: str, used: set, limit: int) -> str: + """An Omega name for Python identifier `py`: at most `limit` characters, not a + keyword (nor starting with an eight-letter one), not a harness name, not used.""" + base = py[:limit] + if len(base) > 8 and base[:8] in KEYWORDS: + base = base[0].upper() + base[1:] + if _name_ok(base, used): + return base + for k in range(1, 100): + suffix = "_" if k == 1 else f"_{k}" + cand = base[: limit - len(suffix)] + suffix + if _name_ok(cand, used): + return cand + raise Refused("name:unmappable", py) + + +def f64_literal(v) -> str: + """Exact round-trip OM-2 float literal (digits.digits[e[-]digits]).""" + f = float(v) + if not math.isfinite(f): + raise Refused("value:non-finite float", repr(v)) + if isinstance(v, int) and float(f) != v: + raise Refused("value:int not exact in f64", repr(v)) + r = repr(f) + if "e" in r: + mant, exp = r.split("e") + if "." not in mant: + mant += ".0" + return f"{mant}e{int(exp)}" + if "." not in r: + r += ".0" + return r + + +class OmExpr(str): + """A rendered expression (for doctests and the seen_tests table) that keeps + its structure in `.node` for test generation.""" + + def __new__(cls, text: str, node): + s = super().__new__(cls, text) + s.node = node + return s + + +def _render(node) -> str: + kind = node[0] + if kind == "lit": + v = node[1] + if isinstance(v, bool): + return "true" if v else "false" + if isinstance(v, float): + return repr(v) + if isinstance(v, str): + return '"' + v.replace("\\", "\\\\").replace('"', '\\"').replace("\n", "\\n").replace("\t", "\\t") + '"' + if v is None: + return "none" + return str(v) + if kind == "var": + return node[1] + if kind in ("list", "tuple", "set"): + o, c = {"list": "[]", "tuple": "()", "set": "{}"}[kind] + return o + ", ".join(_render(e) for e in node[1]) + c + if kind == "dict": + return "{" + ", ".join(f"{_render(k)}: {_render(v)}" for k, v in zip(node[1], node[2])) + "}" + if kind == "call": + parts = [_render(node[1])] + [_render(a) for a in node[2]] + return " ".join(parts) + raise ValueError(node) + + +_TEXT_SAFE = re.compile(rb"[\x20-\x7e\n\t]*\Z") + + +def _text_literal(b: bytes) -> Optional[str]: + """An OM-2 `text` literal for bytes b, or None when b needs an escape omc lacks.""" + if not _TEXT_SAFE.match(b): + return None + s = b.decode("ascii") + return '"' + s.replace("\\", "\\\\").replace('"', '\\"').replace("\n", "\\n").replace("\t", "\\t") + '"' + + +class Translator: + stop = ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "] + + def __init__(self): + self.refusal: Optional[Refused] = None + self.params = [] # [(py_name, om_name, type)] + self.ret = None + self.fn = None + self.py_fn = None + self.res = None + self.cases = [] + + def file_ext(self): + return "om" + + def no_completion_prompt_stub(self): + return "trap 14\nend\n" + + # ---- prompt --------------------------------------------------------------- + + def translate_prompt(self, name: str, args: List[ast.arg], returns, description: str) -> Optional[str]: + self.refusal = None + try: + return self._prompt(name, args, returns, description) + except Refused as e: + self.refusal = e + return None + + def _prompt(self, name, args, returns, description): + self.py_fn = name + self.fn = fit_name(name, set(), MAX_FN) + used = {self.fn} + self.params = [] + for a in args: + t = om_type(a.annotation) + om = fit_name(a.arg, used, MAX_LOCAL) + used.add(om) + self.params.append((a.arg, om, t)) + self.ret = om_type(returns) + self.res = None + if isinstance(self.ret, Seq): + self.res = "res" # HARNESS_NAMES keeps parameters off this name + slots = sum(t.slots for _, _, t in self.params) + (2 if self.res else 0) + if slots > MAX_SLOTS: + raise Refused("abi:parameter slots", f"{slots} > {MAX_SLOTS}") + + lines = ["om2"] + for line in description.strip().split("\n"): + lines.append(("note " + line).rstrip()) + renamed = [(py, om) for py, om, _ in self.params if py != om] + if self.fn != name: + renamed.insert(0, (name, self.fn)) + for py, om in renamed: + lines.append(f"note Omega name: {py} is {om} here.") + if self.res: + what = {"str": "bytes", "list": "elements", "tuple": "elements"}[self.ret.py] + lines.append( + f"note Result: write the {what} into res (len res >= {RESULT_CAP}) and return how many were written." + ) + sig = [self.fn] + for _, om, t in self.params: + sig.append(f"{om} {t.om}" if isinstance(t, Scalar) else f"{om} view {t.elem} *") + if self.res: + sig.append(f"res edit {self.ret.elem} *") + rt = "long" if self.res else self.ret.om + lines.append("fn " + " ".join(sig) + f" to {rt}") + return "\n".join(lines) + "\n" + + # ---- values --------------------------------------------------------------- + + def gen_literal(self, c): + return ("lit", c) + + def gen_var(self, v): + if v == "candidate" or v == self.py_fn: + return ("var", self.fn or v) + return ("var", v) + + def gen_list(self, l): + return ("list", l) + + def gen_tuple(self, t): + return ("tuple", t) + + def gen_dict(self, keys, values): + return ("dict", keys, values) + + def gen_set(self, s): + return ("set", s) + + def gen_call(self, func, args): + return ("call", func, args) + + def finalize(self, expr, context): + return OmExpr(_render(expr), expr) + + # ---- tests ---------------------------------------------------------------- + + def test_suite_prefix_lines(self, entry_point): + self.cases = [] + return [] + + def test_suite_suffix_lines(self): + lines = [f'text mpe_ok "{MPE_OK_LINE}\\n"', "fn main to int"] + for k in range(len(self.cases)): + lines += [f"if not tc_{k}", f"ret {k + 1}", "end"] + lines += ["w = write 1 mpe_ok 0 len mpe_ok", "ret 0", "end"] + return lines + + def _scalar(self, node, t: Scalar, rhs: bool) -> str: + if node[0] != "lit": + raise Refused("value:non-literal", _render(node)) + v = node[1] + if t.om == "bool": + if isinstance(v, bool): + return "true" if v else "false" + if rhs and isinstance(v, int) and v in (0, 1): + return "true" if v else "false" + raise Refused("value:not a bool", repr(v)) + if t.om == "long": + if isinstance(v, bool): + return "1" if v else "0" + if isinstance(v, float) and v.is_integer(): + v = int(v) + if not isinstance(v, int): + raise Refused("value:not an int", repr(v)) + if not I64_MIN <= v <= I64_MAX: + raise Refused("value:int outside i64", repr(v)) + return str(v) + if isinstance(v, bool) or not isinstance(v, (int, float)): + raise Refused("value:not a float", repr(v)) + return f64_literal(v) + + def _elements(self, node, t: Seq, rhs: bool) -> List[str]: + if t.py == "str": + if node[0] != "lit" or not isinstance(node[1], str): + raise Refused("value:not a str", _render(node)) + if not node[1].isascii(): + raise Refused("value:non-ASCII string", "Omega strings are bytes, Python str is code points") + return [str(b) for b in node[1].encode("ascii")] + if node[0] not in ("list", "tuple"): + raise Refused("value:not a sequence", _render(node)) + if t.fixed is not None and len(node[1]) != t.fixed: + raise Refused("value:tuple arity", _render(node)) + return [self._scalar(e, Scalar(t.elem), rhs) for e in node[1]] + + def deep_equality(self, left, right): + try: + return self._case(left.node, right.node) + except Refused as e: + self.refusal = e + raise + + def _case(self, call, expect): + if call[0] != "call" or call[1] != ("var", self.fn): + raise Refused("tests:not a direct candidate call", _render(call)) + if len(call[2]) != len(self.params): + raise Refused("tests:arity", _render(call)) + k = len(self.cases) + if k >= MAX_CASES: + raise Refused("tests:too many cases", f"> {MAX_CASES}") + texts, body, argv = [], [], [] + for j, (node, (_, _, t)) in enumerate(zip(call[2], self.params)): + if isinstance(t, Scalar): + argv.append(self._scalar(node, t, rhs=False)) + continue + elems = self._elements(node, t, rhs=False) + # An empty string goes through `part a 0 0`, never `text t ""`: the pinned omc + # takes a zero-length name as an unsized parameter (omc.om arrarg, nm_len 0) + # and passes a stale register as the count, so `len` is garbage in the callee. + if t.py == "str" and elems: + lit = _text_literal(node[1].encode("ascii")) + if lit is not None: + texts.append(f"text t{k}_{j} {lit}") + argv.append(f"t{k}_{j}") + continue + zero = "0.0" if t.elem == "f64" else "0" + body.append(f"a{j} = new {t.elem} {max(1, len(elems))} {zero}") + body += [f"put a{j} {i} {v}" for i, v in enumerate(elems)] + argv.append(f"a{j}" if elems else f"part a{j} 0 0") + if self.res: + zero = "0.0" if self.ret.elem == "f64" else "0" + exp = self._elements(expect, self.ret, rhs=True) + body.append(f"res = new {self.ret.elem} {max(RESULT_CAP, len(exp))} {zero}") + argv.append("res") + body.append(f"r = {self.fn} {' '.join(argv)}".rstrip()) + body += [f"if ne r {len(exp)}", "ret false", "end"] + for i, v in enumerate(exp): + body += [f"if ne get res {i} {v}", "ret false", "end"] + body.append("ret true") + else: + exp = self._scalar(expect, self.ret, rhs=True) + body.append(f"r = {self.fn} {' '.join(argv)}".rstrip()) + body.append(f"ret eq r {exp}") + self.cases.append(k) + return "\n".join(texts + [f"fn tc_{k} to bool"] + body + ["end"]) diff --git a/bench/prompts/COVERAGE.md b/bench/prompts/COVERAGE.md new file mode 100644 index 0000000..c540dbb --- /dev/null +++ b/bench/prompts/COVERAGE.md @@ -0,0 +1,35 @@ +# MultiPL-E Omega coverage + +Generated by `bench/multipl-e/build_prompts.py`; do not edit by hand. +MultiPL-E `3025a531af7450e7df8b96fe0440e9804480bbad`, omega-mv pin `e5b32567a7aff3ce594e3254a622a846a6cd190b`. + +## humaneval + +129 of 164 translate (3 are already dropped by MultiPL-E's originals, 32 of its 161 are refused here). + +| refusal reason | problems | +|---|---| +| `type:List[str]` | 17 | +| `type:List[compound]` | 4 | +| `type:Optional` | 3 | +| `type:Union` | 3 | +| `type:Tuple[mixed]` | 3 | +| `type:Dict` | 2 | + +## mbpp + +272 of 400 translate; 128 refused. + +| refusal reason | problems | +|---|---| +| `type:List[compound]` | 67 | +| `type:List[str]` | 22 | +| `type:Tuple[mixed]` | 11 | +| `type:Dict` | 10 | +| `type:Optional` | 6 | +| `abi:parameter slots` | 5 | +| `type:Any` | 2 | +| `type:Union` | 2 | +| `value:int outside i64` | 1 | +| `type:List[bool]` | 1 | +| `type:Set` | 1 | diff --git a/bench/prompts/humaneval-om.coverage.json b/bench/prompts/humaneval-om.coverage.json new file mode 100644 index 0000000..1f880ea --- /dev/null +++ b/bench/prompts/humaneval-om.coverage.json @@ -0,0 +1,859 @@ +{ + "benchmark": "humaneval", + "originals": "datasets/originals-with-cleaned-doctests", + "multipl_e_commit": "3025a531af7450e7df8b96fe0440e9804480bbad", + "omega_mv_pin": "e5b32567a7aff3ce594e3254a622a846a6cd190b", + "doctests": "transform", + "prompt_terminology": "reworded", + "upstream_size": 164, + "originals_count": 161, + "translated": 129, + "refused": 32, + "reasons": { + "type:List[str]": 17, + "type:List[compound]": 4, + "type:Optional": 3, + "type:Union": 3, + "type:Tuple[mixed]": 3, + "type:Dict": 2 + }, + "problems": [ + { + "name": "HumanEval_0_has_close_elements", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_1_separate_paren_groups", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_2_truncate_number", + "translated": true, + "cases": 3 + }, + { + "name": "HumanEval_3_below_zero", + "translated": true, + "cases": 6 + }, + { + "name": "HumanEval_4_mean_absolute_deviation", + "translated": true, + "cases": 3 + }, + { + "name": "HumanEval_5_intersperse", + "translated": true, + "cases": 3 + }, + { + "name": "HumanEval_6_parse_nested_parens", + "translated": true, + "cases": 3 + }, + { + "name": "HumanEval_7_filter_by_substring", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_8_sum_product", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_9_rolling_max", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_10_make_palindrome", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_11_string_xor", + "translated": true, + "cases": 3 + }, + { + "name": "HumanEval_12_longest", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_13_greatest_common_divisor", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_14_all_prefixes", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_15_string_sequence", + "translated": true, + "cases": 3 + }, + { + "name": "HumanEval_16_count_distinct_characters", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_17_parse_music", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_18_how_many_times", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_19_sort_numbers", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_20_find_closest_elements", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_21_rescale_to_unit", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_22_filter_integers", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Any]" + }, + { + "name": "HumanEval_23_strlen", + "translated": true, + "cases": 3 + }, + { + "name": "HumanEval_24_largest_divisor", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_25_factorize", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_26_remove_duplicates", + "translated": true, + "cases": 3 + }, + { + "name": "HumanEval_27_flip_case", + "translated": true, + "cases": 3 + }, + { + "name": "HumanEval_28_concatenate", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_29_filter_by_prefix", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_30_get_positive", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_31_is_prime", + "translated": true, + "cases": 13 + }, + { + "name": "HumanEval_33_sort_third", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_34_unique", + "translated": true, + "cases": 1 + }, + { + "name": "HumanEval_35_max_element", + "translated": true, + "cases": 2 + }, + { + "name": "HumanEval_36_fizz_buzz", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_37_sort_even", + "translated": true, + "cases": 3 + }, + { + "name": "HumanEval_39_prime_fib", + "translated": true, + "cases": 10 + }, + { + "name": "HumanEval_40_triples_sum_to_zero", + "translated": true, + "cases": 9 + }, + { + "name": "HumanEval_41_car_race_collision", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_42_incr_list", + "translated": true, + "cases": 3 + }, + { + "name": "HumanEval_43_pairs_sum_to_zero", + "translated": true, + "cases": 9 + }, + { + "name": "HumanEval_44_change_base", + "translated": true, + "cases": 12 + }, + { + "name": "HumanEval_45_triangle_area", + "translated": true, + "cases": 3 + }, + { + "name": "HumanEval_46_fib4", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_47_median", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_48_is_palindrome", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_49_modp", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_51_remove_vowels", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_52_below_threshold", + "translated": true, + "cases": 6 + }, + { + "name": "HumanEval_53_add", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_54_same_chars", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_55_fib", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_56_correct_bracketing", + "translated": true, + "cases": 12 + }, + { + "name": "HumanEval_57_monotonic", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_58_common", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_59_largest_prime_factor", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_60_sum_to_n", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_61_correct_bracketing", + "translated": true, + "cases": 12 + }, + { + "name": "HumanEval_62_derivative", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_63_fibfib", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_64_vowels_count", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_65_circular_shift", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_66_digitSum", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_67_fruit_distribution", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_68_pluck", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_69_search", + "translated": true, + "cases": 25 + }, + { + "name": "HumanEval_70_strange_sort_list", + "translated": true, + "cases": 9 + }, + { + "name": "HumanEval_71_triangle_area", + "translated": true, + "cases": 9 + }, + { + "name": "HumanEval_72_will_it_fly", + "translated": true, + "cases": 6 + }, + { + "name": "HumanEval_73_smallest_change", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_74_total_match", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_75_is_multiply_prime", + "translated": true, + "cases": 10 + }, + { + "name": "HumanEval_76_is_simple_power", + "translated": true, + "cases": 10 + }, + { + "name": "HumanEval_77_iscube", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_78_hex_key", + "translated": true, + "cases": 6 + }, + { + "name": "HumanEval_79_decimal_to_binary", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_80_is_happy", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_81_numerical_letter_grade", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_82_prime_length", + "translated": true, + "cases": 16 + }, + { + "name": "HumanEval_83_starts_one_ends", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_84_solve", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_85_add", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_86_anti_shuffle", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_87_get_row", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "HumanEval_88_sort_array", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_89_encrypt", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_90_next_smallest", + "translated": false, + "reason": "type:Optional", + "detail": "Optional[int]" + }, + { + "name": "HumanEval_91_is_bored", + "translated": true, + "cases": 6 + }, + { + "name": "HumanEval_92_any_int", + "translated": true, + "cases": 10 + }, + { + "name": "HumanEval_93_encode", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_94_skjkasdkd", + "translated": true, + "cases": 9 + }, + { + "name": "HumanEval_95_check_dict_case", + "translated": false, + "reason": "type:Dict", + "detail": "Dict[str, str]" + }, + { + "name": "HumanEval_96_count_up_to", + "translated": true, + "cases": 10 + }, + { + "name": "HumanEval_97_multiply", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_98_count_upper", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_99_closest_integer", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_100_make_a_pile", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_101_words_string", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_102_choose_num", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_103_rounded_avg", + "translated": false, + "reason": "type:Union", + "detail": "Union[str, int]" + }, + { + "name": "HumanEval_104_unique_digits", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_105_by_length", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_106_f", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_107_even_odd_palindrome", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_108_count_nums", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_109_move_one_ball", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_110_exchange", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_111_histogram", + "translated": false, + "reason": "type:Dict", + "detail": "Dict[str, int]" + }, + { + "name": "HumanEval_112_reverse_delete", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[str, bool]" + }, + { + "name": "HumanEval_113_odd_count", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_114_minSubArraySum", + "translated": true, + "cases": 12 + }, + { + "name": "HumanEval_115_max_fill", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "HumanEval_116_sort_array", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_117_select_words", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_118_get_closest_vowel", + "translated": true, + "cases": 13 + }, + { + "name": "HumanEval_119_match_parens", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_120_maximum", + "translated": true, + "cases": 11 + }, + { + "name": "HumanEval_121_solution", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_122_add_elements", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_123_get_odd_collatz", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_124_valid_date", + "translated": true, + "cases": 16 + }, + { + "name": "HumanEval_125_split_words", + "translated": false, + "reason": "type:Union", + "detail": "Union[List[str], int]" + }, + { + "name": "HumanEval_126_is_sorted", + "translated": true, + "cases": 13 + }, + { + "name": "HumanEval_127_intersection", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_128_prod_signs", + "translated": false, + "reason": "type:Optional", + "detail": "Optional[int]" + }, + { + "name": "HumanEval_129_minPath", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "HumanEval_130_tri", + "translated": true, + "cases": 10 + }, + { + "name": "HumanEval_131_digits", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_132_is_nested", + "translated": true, + "cases": 14 + }, + { + "name": "HumanEval_133_sum_squares", + "translated": true, + "cases": 12 + }, + { + "name": "HumanEval_134_check_if_last_char_is_a_letter", + "translated": true, + "cases": 10 + }, + { + "name": "HumanEval_135_can_arrange", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_136_largest_smallest_integers", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[Optional[int], Optional[int]]" + }, + { + "name": "HumanEval_137_compare_one", + "translated": false, + "reason": "type:Union", + "detail": "Union[int, float, str]" + }, + { + "name": "HumanEval_138_is_equal_to_sum_even", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_139_special_factorial", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_140_fix_spaces", + "translated": true, + "cases": 5 + }, + { + "name": "HumanEval_141_file_name_check", + "translated": true, + "cases": 26 + }, + { + "name": "HumanEval_142_sum_squares", + "translated": true, + "cases": 11 + }, + { + "name": "HumanEval_143_words_in_sentence", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_144_simplify", + "translated": true, + "cases": 13 + }, + { + "name": "HumanEval_145_order_by_points", + "translated": true, + "cases": 6 + }, + { + "name": "HumanEval_146_specialFilter", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_147_get_max_triples", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_148_bf", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[str, ...]" + }, + { + "name": "HumanEval_149_sorted_list_sum", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_150_x_or_y", + "translated": true, + "cases": 10 + }, + { + "name": "HumanEval_151_double_the_difference", + "translated": true, + "cases": 7 + }, + { + "name": "HumanEval_152_compare", + "translated": true, + "cases": 4 + }, + { + "name": "HumanEval_153_Strongest_Extension", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_154_cycpattern_check", + "translated": true, + "cases": 6 + }, + { + "name": "HumanEval_155_even_odd_count", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_156_int_to_mini_roman", + "translated": true, + "cases": 14 + }, + { + "name": "HumanEval_157_right_angle_triangle", + "translated": true, + "cases": 11 + }, + { + "name": "HumanEval_158_find_max", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_159_eat", + "translated": true, + "cases": 6 + }, + { + "name": "HumanEval_160_do_algebra", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "HumanEval_161_solve", + "translated": true, + "cases": 8 + }, + { + "name": "HumanEval_162_string_to_md5", + "translated": false, + "reason": "type:Optional", + "detail": "Optional[str]" + }, + { + "name": "HumanEval_163_generate_integers", + "translated": true, + "cases": 4 + } + ] +} diff --git a/bench/prompts/humaneval-om.jsonl b/bench/prompts/humaneval-om.jsonl new file mode 100644 index 0000000..d208273 --- /dev/null +++ b/bench/prompts/humaneval-om.jsonl @@ -0,0 +1,129 @@ +{"name": "HumanEval_0_has_close_elements", "language": "om", "prompt": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_0_has_close_elements.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_2_truncate_number", "language": "om", "prompt": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_2_truncate_number.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_3_below_zero", "language": "om", "prompt": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_3_below_zero.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_4_mean_absolute_deviation", "language": "om", "prompt": "om2\nnote For a given array of input numbers, calculate Mean Absolute Deviation\nnote around the mean of this dataset.\nnote Mean Absolute Deviation is the average absolute difference between each\nnote element and a centerpoint (mean in this case):\nnote MAD = average | x - x_mean |\nnote >>> mean_absolute_deviation [1.0, 2.0, 3.0, 4.0]\nnote 1.0\nfn mean_absolute_deviation numbers view f64 * to f64\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_4_mean_absolute_deviation.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new f64 2 0.0\nput a0 0 1.0\nput a0 1 2.0\nr = mean_absolute_deviation a0\nret eq r 0.5\nend\nfn tc_1 to bool\na0 = new f64 4 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nr = mean_absolute_deviation a0\nret eq r 1.0\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nr = mean_absolute_deviation a0\nret eq r 1.2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_5_intersperse", "language": "om", "prompt": "om2\nnote Insert a number 'delimeter' between every two consecutive elements of input array `numbers'\nnote >>> intersperse [] 4\nnote []\nnote >>> intersperse [1, 2, 3] 4\nnote [1, 4, 2, 4, 3]\nnote Omega name: delimeter is delimete here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn intersperse numbers view long * delimete long res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_5_intersperse.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = intersperse part a0 0 0 7 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 5\nput a0 1 6\nput a0 2 3\nput a0 3 2\nres = new long 4096 0\nr = intersperse a0 8 res\nif ne r 7\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 8\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 8\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 8\nret false\nend\nif ne get res 6 2\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 2\nput a0 1 2\nput a0 2 2\nres = new long 4096 0\nr = intersperse a0 2 res\nif ne r 5\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 2\nret false\nend\nif ne get res 4 2\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_6_parse_nested_parens", "language": "om", "prompt": "om2\nnote Input to this function is a string represented multiple groups for nested parentheses separated by spaces.\nnote For each of the group, output the deepest level of nesting of parentheses.\nnote E.g. (()()) has maximum two levels of nesting while ((())) has three.\nnote >>> parse_nested_parens \"(()()) ((())) () ((())()())\"\nnote [2, 3, 1, 3]\nnote Omega name: paren_string is paren_st here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn parse_nested_parens paren_st view uchar * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_6_parse_nested_parens.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"(()()) ((())) () ((())()())\"\nfn tc_0 to bool\nres = new long 4096 0\nr = parse_nested_parens t0_0 res\nif ne r 4\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 1\nret false\nend\nif ne get res 3 3\nret false\nend\nret true\nend\ntext t1_0 \"() (()) ((())) (((())))\"\nfn tc_1 to bool\nres = new long 4096 0\nr = parse_nested_parens t1_0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\ntext t2_0 \"(()(())((())))\"\nfn tc_2 to bool\nres = new long 4096 0\nr = parse_nested_parens t2_0 res\nif ne r 1\nret false\nend\nif ne get res 0 4\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_8_sum_product", "language": "om", "prompt": "om2\nnote For a given array of integers, return an array consisting of a sum and a product of all the integers in an array.\nnote Empty sum should be equal to 0 and empty product should be equal to 1.\nnote >>> sum_product []\nnote (0, 1)\nnote >>> sum_product [1, 2, 3, 4]\nnote (10, 24)\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn sum_product numbers view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_8_sum_product.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = sum_product part a0 0 0 res\nif ne r 2\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 1\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 1\nput a0 2 1\nres = new long 4096 0\nr = sum_product a0 res\nif ne r 2\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 100\nput a0 1 0\nres = new long 4096 0\nr = sum_product a0 res\nif ne r 2\nret false\nend\nif ne get res 0 100\nret false\nend\nif ne get res 1 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 3 0\nput a0 0 3\nput a0 1 5\nput a0 2 7\nres = new long 4096 0\nr = sum_product a0 res\nif ne r 2\nret false\nend\nif ne get res 0 15\nret false\nend\nif ne get res 1 105\nret false\nend\nret true\nend\nfn tc_4 to bool\na0 = new long 1 0\nput a0 0 10\nres = new long 4096 0\nr = sum_product a0 res\nif ne r 2\nret false\nend\nif ne get res 0 10\nret false\nend\nif ne get res 1 10\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_9_rolling_max", "language": "om", "prompt": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_9_rolling_max.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_10_make_palindrome", "language": "om", "prompt": "om2\nnote Find the shortest palindrome that begins with a supplied string.\nnote Algorithm idea is simple:\nnote - Find the longest postfix of supplied string that is a palindrome.\nnote - Append to the end of the string reverse of a string prefix that comes before the palindromic suffix.\nnote >>> make_palindrome \"\"\nnote \"\"\nnote >>> make_palindrome \"cat\"\nnote \"catac\"\nnote >>> make_palindrome \"cata\"\nnote \"catac\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn make_palindrome string view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_10_make_palindrome.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = make_palindrome part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"x\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = make_palindrome t1_0 res\nif ne r 1\nret false\nend\nif ne get res 0 120\nret false\nend\nret true\nend\ntext t2_0 \"xyz\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = make_palindrome t2_0 res\nif ne r 5\nret false\nend\nif ne get res 0 120\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 122\nret false\nend\nif ne get res 3 121\nret false\nend\nif ne get res 4 120\nret false\nend\nret true\nend\ntext t3_0 \"xyx\"\nfn tc_3 to bool\nres = new uchar 4096 0\nr = make_palindrome t3_0 res\nif ne r 3\nret false\nend\nif ne get res 0 120\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 120\nret false\nend\nret true\nend\ntext t4_0 \"jerry\"\nfn tc_4 to bool\nres = new uchar 4096 0\nr = make_palindrome t4_0 res\nif ne r 9\nret false\nend\nif ne get res 0 106\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 114\nret false\nend\nif ne get res 3 114\nret false\nend\nif ne get res 4 121\nret false\nend\nif ne get res 5 114\nret false\nend\nif ne get res 6 114\nret false\nend\nif ne get res 7 101\nret false\nend\nif ne get res 8 106\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_11_string_xor", "language": "om", "prompt": "om2\nnote Input are two strings a and b consisting only of 1s and 0s.\nnote Perform binary XOR on these inputs and return result also as a string.\nnote >>> string_xor \"010\" \"110\"\nnote \"100\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn string_xor a view uchar * b view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_11_string_xor.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"111000\"\ntext t0_1 \"101010\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = string_xor t0_0 t0_1 res\nif ne r 6\nret false\nend\nif ne get res 0 48\nret false\nend\nif ne get res 1 49\nret false\nend\nif ne get res 2 48\nret false\nend\nif ne get res 3 48\nret false\nend\nif ne get res 4 49\nret false\nend\nif ne get res 5 48\nret false\nend\nret true\nend\ntext t1_0 \"1\"\ntext t1_1 \"1\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = string_xor t1_0 t1_1 res\nif ne r 1\nret false\nend\nif ne get res 0 48\nret false\nend\nret true\nend\ntext t2_0 \"0101\"\ntext t2_1 \"0000\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = string_xor t2_0 t2_1 res\nif ne r 4\nret false\nend\nif ne get res 0 48\nret false\nend\nif ne get res 1 49\nret false\nend\nif ne get res 2 48\nret false\nend\nif ne get res 3 49\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_13_greatest_common_divisor", "language": "om", "prompt": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_13_greatest_common_divisor.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_15_string_sequence", "language": "om", "prompt": "om2\nnote Return a string containing space-delimited numbers starting from 0 upto n inclusive.\nnote >>> string_sequence 0\nnote \"0\"\nnote >>> string_sequence 5\nnote \"0 1 2 3 4 5\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn string_sequence n long res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_15_string_sequence.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new uchar 4096 0\nr = string_sequence 0 res\nif ne r 1\nret false\nend\nif ne get res 0 48\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new uchar 4096 0\nr = string_sequence 3 res\nif ne r 7\nret false\nend\nif ne get res 0 48\nret false\nend\nif ne get res 1 32\nret false\nend\nif ne get res 2 49\nret false\nend\nif ne get res 3 32\nret false\nend\nif ne get res 4 50\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 51\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new uchar 4096 0\nr = string_sequence 10 res\nif ne r 22\nret false\nend\nif ne get res 0 48\nret false\nend\nif ne get res 1 32\nret false\nend\nif ne get res 2 49\nret false\nend\nif ne get res 3 32\nret false\nend\nif ne get res 4 50\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 51\nret false\nend\nif ne get res 7 32\nret false\nend\nif ne get res 8 52\nret false\nend\nif ne get res 9 32\nret false\nend\nif ne get res 10 53\nret false\nend\nif ne get res 11 32\nret false\nend\nif ne get res 12 54\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 55\nret false\nend\nif ne get res 15 32\nret false\nend\nif ne get res 16 56\nret false\nend\nif ne get res 17 32\nret false\nend\nif ne get res 18 57\nret false\nend\nif ne get res 19 32\nret false\nend\nif ne get res 20 49\nret false\nend\nif ne get res 21 48\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_16_count_distinct_characters", "language": "om", "prompt": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_16_count_distinct_characters.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_17_parse_music", "language": "om", "prompt": "om2\nnote Input to this function is a string representing musical notes in a special ASCII format.\nnote Your task is to parse this string and return array of integers corresponding to how many beats does each\nnote not last.\nnote Here is a legend:\nnote 'o' - whole note, lasts four beats\nnote 'o|' - half note, lasts two beats\nnote '.|' - quater note, lasts one beat\nnote >>> parse_music \"o o| .| o| o| .| .| .| .| o o\"\nnote [4, 2, 1, 2, 2, 1, 1, 1, 1, 4, 4]\nnote Omega name: music_string is music_st here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn parse_music music_st view uchar * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_17_parse_music.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new long 4096 0\nr = parse_music part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"o o o o\"\nfn tc_1 to bool\nres = new long 4096 0\nr = parse_music t1_0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\ntext t2_0 \".| .| .| .|\"\nfn tc_2 to bool\nres = new long 4096 0\nr = parse_music t2_0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 1\nret false\nend\nif ne get res 2 1\nret false\nend\nif ne get res 3 1\nret false\nend\nret true\nend\ntext t3_0 \"o| o| .| .| o o o o\"\nfn tc_3 to bool\nres = new long 4096 0\nr = parse_music t3_0 res\nif ne r 8\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 1\nret false\nend\nif ne get res 3 1\nret false\nend\nif ne get res 4 4\nret false\nend\nif ne get res 5 4\nret false\nend\nif ne get res 6 4\nret false\nend\nif ne get res 7 4\nret false\nend\nret true\nend\ntext t4_0 \"o| .| o| .| o o| o o|\"\nfn tc_4 to bool\nres = new long 4096 0\nr = parse_music t4_0 res\nif ne r 8\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 1\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 1\nret false\nend\nif ne get res 4 4\nret false\nend\nif ne get res 5 2\nret false\nend\nif ne get res 6 4\nret false\nend\nif ne get res 7 2\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_18_how_many_times", "language": "om", "prompt": "om2\nnote Find how many times a given substring can be found in the original string. Count overlaping cases.\nnote >>> how_many_times \"\" \"a\"\nnote 0\nnote >>> how_many_times \"aaa\" \"a\"\nnote 3\nnote >>> how_many_times \"aaaa\" \"aa\"\nnote 3\nnote Omega name: substring is substrin here.\nfn how_many_times string view uchar * substrin view uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_18_how_many_times.py", "prompt_terminology": "reworded", "tests": "text t0_1 \"x\"\nfn tc_0 to bool\na0 = new uchar 1 0\nr = how_many_times part a0 0 0 t0_1\nret eq r 0\nend\ntext t1_0 \"xyxyxyx\"\ntext t1_1 \"x\"\nfn tc_1 to bool\nr = how_many_times t1_0 t1_1\nret eq r 4\nend\ntext t2_0 \"cacacacac\"\ntext t2_1 \"cac\"\nfn tc_2 to bool\nr = how_many_times t2_0 t2_1\nret eq r 4\nend\ntext t3_0 \"john doe\"\ntext t3_1 \"john\"\nfn tc_3 to bool\nr = how_many_times t3_0 t3_1\nret eq r 1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_19_sort_numbers", "language": "om", "prompt": "om2\nnote Input is a space-delimited string of numberals from 'zero' to 'nine'.\nnote Valid choices are 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight' and 'nine'.\nnote Return the string with numbers sorted from smallest to largest\nnote >>> sort_numbers \"three one five\"\nnote \"one three five\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn sort_numbers numbers view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_19_sort_numbers.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = sort_numbers part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"three\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = sort_numbers t1_0 res\nif ne r 5\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 104\nret false\nend\nif ne get res 2 114\nret false\nend\nif ne get res 3 101\nret false\nend\nif ne get res 4 101\nret false\nend\nret true\nend\ntext t2_0 \"three five nine\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = sort_numbers t2_0 res\nif ne r 15\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 104\nret false\nend\nif ne get res 2 114\nret false\nend\nif ne get res 3 101\nret false\nend\nif ne get res 4 101\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 102\nret false\nend\nif ne get res 7 105\nret false\nend\nif ne get res 8 118\nret false\nend\nif ne get res 9 101\nret false\nend\nif ne get res 10 32\nret false\nend\nif ne get res 11 110\nret false\nend\nif ne get res 12 105\nret false\nend\nif ne get res 13 110\nret false\nend\nif ne get res 14 101\nret false\nend\nret true\nend\ntext t3_0 \"five zero four seven nine eight\"\nfn tc_3 to bool\nres = new uchar 4096 0\nr = sort_numbers t3_0 res\nif ne r 31\nret false\nend\nif ne get res 0 122\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 114\nret false\nend\nif ne get res 3 111\nret false\nend\nif ne get res 4 32\nret false\nend\nif ne get res 5 102\nret false\nend\nif ne get res 6 111\nret false\nend\nif ne get res 7 117\nret false\nend\nif ne get res 8 114\nret false\nend\nif ne get res 9 32\nret false\nend\nif ne get res 10 102\nret false\nend\nif ne get res 11 105\nret false\nend\nif ne get res 12 118\nret false\nend\nif ne get res 13 101\nret false\nend\nif ne get res 14 32\nret false\nend\nif ne get res 15 115\nret false\nend\nif ne get res 16 101\nret false\nend\nif ne get res 17 118\nret false\nend\nif ne get res 18 101\nret false\nend\nif ne get res 19 110\nret false\nend\nif ne get res 20 32\nret false\nend\nif ne get res 21 101\nret false\nend\nif ne get res 22 105\nret false\nend\nif ne get res 23 103\nret false\nend\nif ne get res 24 104\nret false\nend\nif ne get res 25 116\nret false\nend\nif ne get res 26 32\nret false\nend\nif ne get res 27 110\nret false\nend\nif ne get res 28 105\nret false\nend\nif ne get res 29 110\nret false\nend\nif ne get res 30 101\nret false\nend\nret true\nend\ntext t4_0 \"six five four three two one zero\"\nfn tc_4 to bool\nres = new uchar 4096 0\nr = sort_numbers t4_0 res\nif ne r 32\nret false\nend\nif ne get res 0 122\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 114\nret false\nend\nif ne get res 3 111\nret false\nend\nif ne get res 4 32\nret false\nend\nif ne get res 5 111\nret false\nend\nif ne get res 6 110\nret false\nend\nif ne get res 7 101\nret false\nend\nif ne get res 8 32\nret false\nend\nif ne get res 9 116\nret false\nend\nif ne get res 10 119\nret false\nend\nif ne get res 11 111\nret false\nend\nif ne get res 12 32\nret false\nend\nif ne get res 13 116\nret false\nend\nif ne get res 14 104\nret false\nend\nif ne get res 15 114\nret false\nend\nif ne get res 16 101\nret false\nend\nif ne get res 17 101\nret false\nend\nif ne get res 18 32\nret false\nend\nif ne get res 19 102\nret false\nend\nif ne get res 20 111\nret false\nend\nif ne get res 21 117\nret false\nend\nif ne get res 22 114\nret false\nend\nif ne get res 23 32\nret false\nend\nif ne get res 24 102\nret false\nend\nif ne get res 25 105\nret false\nend\nif ne get res 26 118\nret false\nend\nif ne get res 27 101\nret false\nend\nif ne get res 28 32\nret false\nend\nif ne get res 29 115\nret false\nend\nif ne get res 30 105\nret false\nend\nif ne get res 31 120\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_20_find_closest_elements", "language": "om", "prompt": "om2\nnote From a supplied array of numbers (of length at least two) select and return two that are the closest to each\nnote other and return them in order (smaller number, larger number).\nnote >>> find_closest_elements [1.0, 2.0, 3.0, 4.0, 5.0, 2.2]\nnote (2.0, 2.2)\nnote >>> find_closest_elements [1.0, 2.0, 3.0, 4.0, 5.0, 2.0]\nnote (2.0, 2.0)\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn find_closest_elements numbers view f64 * res edit f64 * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_20_find_closest_elements.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nres = new f64 4096 0.0\nr = find_closest_elements a0 res\nif ne r 2\nret false\nend\nif ne get res 0 3.9\nret false\nend\nif ne get res 1 4.0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nres = new f64 4096 0.0\nr = find_closest_elements a0 res\nif ne r 2\nret false\nend\nif ne get res 0 5.0\nret false\nend\nif ne get res 1 5.9\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nres = new f64 4096 0.0\nr = find_closest_elements a0 res\nif ne r 2\nret false\nend\nif ne get res 0 2.0\nret false\nend\nif ne get res 1 2.2\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nres = new f64 4096 0.0\nr = find_closest_elements a0 res\nif ne r 2\nret false\nend\nif ne get res 0 2.0\nret false\nend\nif ne get res 1 2.0\nret false\nend\nret true\nend\nfn tc_4 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nres = new f64 4096 0.0\nr = find_closest_elements a0 res\nif ne r 2\nret false\nend\nif ne get res 0 2.2\nret false\nend\nif ne get res 1 3.1\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_21_rescale_to_unit", "language": "om", "prompt": "om2\nnote Given array of numbers (of at least two elements), apply a linear transform to that array,\nnote such that the smallest number will become 0 and the largest will become 1\nnote >>> rescale_to_unit [1.0, 2.0, 3.0, 4.0, 5.0]\nnote [0.0, 0.25, 0.5, 0.75, 1.0]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rescale_to_unit numbers view f64 * res edit f64 * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_21_rescale_to_unit.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new f64 2 0.0\nput a0 0 2.0\nput a0 1 49.9\nres = new f64 4096 0.0\nr = rescale_to_unit a0 res\nif ne r 2\nret false\nend\nif ne get res 0 0.0\nret false\nend\nif ne get res 1 1.0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new f64 2 0.0\nput a0 0 100.0\nput a0 1 49.9\nres = new f64 4096 0.0\nr = rescale_to_unit a0 res\nif ne r 2\nret false\nend\nif ne get res 0 1.0\nret false\nend\nif ne get res 1 0.0\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nres = new f64 4096 0.0\nr = rescale_to_unit a0 res\nif ne r 5\nret false\nend\nif ne get res 0 0.0\nret false\nend\nif ne get res 1 0.25\nret false\nend\nif ne get res 2 0.5\nret false\nend\nif ne get res 3 0.75\nret false\nend\nif ne get res 4 1.0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 2.0\nput a0 1 1.0\nput a0 2 5.0\nput a0 3 3.0\nput a0 4 4.0\nres = new f64 4096 0.0\nr = rescale_to_unit a0 res\nif ne r 5\nret false\nend\nif ne get res 0 0.25\nret false\nend\nif ne get res 1 0.0\nret false\nend\nif ne get res 2 1.0\nret false\nend\nif ne get res 3 0.5\nret false\nend\nif ne get res 4 0.75\nret false\nend\nret true\nend\nfn tc_4 to bool\na0 = new f64 5 0.0\nput a0 0 12.0\nput a0 1 11.0\nput a0 2 15.0\nput a0 3 13.0\nput a0 4 14.0\nres = new f64 4096 0.0\nr = rescale_to_unit a0 res\nif ne r 5\nret false\nend\nif ne get res 0 0.25\nret false\nend\nif ne get res 1 0.0\nret false\nend\nif ne get res 2 1.0\nret false\nend\nif ne get res 3 0.5\nret false\nend\nif ne get res 4 0.75\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_23_strlen", "language": "om", "prompt": "om2\nnote Return length of given string\nnote >>> strlen \"\"\nnote 0\nnote >>> strlen \"abc\"\nnote 3\nfn strlen string view uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_23_strlen.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = strlen part a0 0 0\nret eq r 0\nend\ntext t1_0 \"x\"\nfn tc_1 to bool\nr = strlen t1_0\nret eq r 1\nend\ntext t2_0 \"asdasnakj\"\nfn tc_2 to bool\nr = strlen t2_0\nret eq r 9\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_24_largest_divisor", "language": "om", "prompt": "om2\nnote For a given number n, find the largest number that divides n evenly, smaller than n\nnote >>> largest_divisor 15\nnote 5\nfn largest_divisor n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_24_largest_divisor.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = largest_divisor 3\nret eq r 1\nend\nfn tc_1 to bool\nr = largest_divisor 7\nret eq r 1\nend\nfn tc_2 to bool\nr = largest_divisor 10\nret eq r 5\nend\nfn tc_3 to bool\nr = largest_divisor 100\nret eq r 50\nend\nfn tc_4 to bool\nr = largest_divisor 49\nret eq r 7\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_25_factorize", "language": "om", "prompt": "om2\nnote Return array of prime factors of given integer in the order from smallest to largest.\nnote Each of the factors should be listed number of times corresponding to how many times it appeares in factorization.\nnote Input number should be equal to the product of all factors\nnote >>> factorize 8\nnote [2, 2, 2]\nnote >>> factorize 25\nnote [5, 5]\nnote >>> factorize 70\nnote [2, 5, 7]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn factorize n long res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_25_factorize.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = factorize 2 res\nif ne r 1\nret false\nend\nif ne get res 0 2\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = factorize 4 res\nif ne r 2\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 2\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = factorize 8 res\nif ne r 3\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 2\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new long 4096 0\nr = factorize 57 res\nif ne r 2\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 19\nret false\nend\nret true\nend\nfn tc_4 to bool\nres = new long 4096 0\nr = factorize 3249 res\nif ne r 4\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 19\nret false\nend\nif ne get res 3 19\nret false\nend\nret true\nend\nfn tc_5 to bool\nres = new long 4096 0\nr = factorize 185193 res\nif ne r 6\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 19\nret false\nend\nif ne get res 4 19\nret false\nend\nif ne get res 5 19\nret false\nend\nret true\nend\nfn tc_6 to bool\nres = new long 4096 0\nr = factorize 20577 res\nif ne r 4\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 19\nret false\nend\nif ne get res 2 19\nret false\nend\nif ne get res 3 19\nret false\nend\nret true\nend\nfn tc_7 to bool\nres = new long 4096 0\nr = factorize 18 res\nif ne r 3\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_26_remove_duplicates", "language": "om", "prompt": "om2\nnote From an array of integers, remove all elements that occur more than once.\nnote Keep order of elements left the same as in the input.\nnote >>> remove_duplicates [1, 2, 3, 2, 4]\nnote [1, 3, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn remove_duplicates numbers view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_26_remove_duplicates.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = remove_duplicates part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = remove_duplicates a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 2\nput a0 4 4\nput a0 5 3\nput a0 6 5\nres = new long 4096 0\nr = remove_duplicates a0 res\nif ne r 3\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 5\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_27_flip_case", "language": "om", "prompt": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_27_flip_case.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_30_get_positive", "language": "om", "prompt": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_30_get_positive.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_31_is_prime", "language": "om", "prompt": "om2\nnote Return true if a given number is prime, and false otherwise.\nnote >>> is_prime 6\nnote false\nnote >>> is_prime 101\nnote true\nnote >>> is_prime 11\nnote true\nnote >>> is_prime 13441\nnote true\nnote >>> is_prime 61\nnote true\nnote >>> is_prime 4\nnote false\nnote >>> is_prime 1\nnote false\nfn is_prime n long to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_31_is_prime.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_prime 6\nret eq r false\nend\nfn tc_1 to bool\nr = is_prime 101\nret eq r true\nend\nfn tc_2 to bool\nr = is_prime 11\nret eq r true\nend\nfn tc_3 to bool\nr = is_prime 13441\nret eq r true\nend\nfn tc_4 to bool\nr = is_prime 61\nret eq r true\nend\nfn tc_5 to bool\nr = is_prime 4\nret eq r false\nend\nfn tc_6 to bool\nr = is_prime 1\nret eq r false\nend\nfn tc_7 to bool\nr = is_prime 5\nret eq r true\nend\nfn tc_8 to bool\nr = is_prime 11\nret eq r true\nend\nfn tc_9 to bool\nr = is_prime 17\nret eq r true\nend\nfn tc_10 to bool\nr = is_prime 85\nret eq r false\nend\nfn tc_11 to bool\nr = is_prime 77\nret eq r false\nend\nfn tc_12 to bool\nr = is_prime 255379\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nif not tc_12\nret 13\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_33_sort_third", "language": "om", "prompt": "om2\nnote This function takes an array l and returns an array l' such that\nnote l' is identical to l in the indicies that are not divisible by three, while its values at the indicies that are divisible by three are equal\nnote to the values of the corresponding indicies of l, but sorted.\nnote >>> sort_third [1, 2, 3]\nnote [1, 2, 3]\nnote >>> sort_third [5, 6, 3, 4, 8, 9, 2]\nnote [2, 6, 3, 4, 8, 9, 5]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn sort_third l view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_33_sort_third.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 7 0\nput a0 0 5\nput a0 1 6\nput a0 2 3\nput a0 3 4\nput a0 4 8\nput a0 5 9\nput a0 6 2\nres = new long 4096 0\nr = sort_third a0 res\nif ne r 7\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 6\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 8\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 5\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 7 0\nput a0 0 5\nput a0 1 8\nput a0 2 3\nput a0 3 4\nput a0 4 6\nput a0 5 9\nput a0 6 2\nres = new long 4096 0\nr = sort_third a0 res\nif ne r 7\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 8\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 6\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 5\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 7 0\nput a0 0 5\nput a0 1 6\nput a0 2 9\nput a0 3 4\nput a0 4 8\nput a0 5 3\nput a0 6 2\nres = new long 4096 0\nr = sort_third a0 res\nif ne r 7\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 6\nret false\nend\nif ne get res 2 9\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 8\nret false\nend\nif ne get res 5 3\nret false\nend\nif ne get res 6 5\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 5\nput a0 1 6\nput a0 2 3\nput a0 3 4\nput a0 4 8\nput a0 5 9\nput a0 6 2\nput a0 7 1\nres = new long 4096 0\nr = sort_third a0 res\nif ne r 8\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 6\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 8\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 5\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_34_unique", "language": "om", "prompt": "om2\nnote Return sorted unique elements in an array\nnote >>> unique [5, 3, 5, 2, 3, 3, 9, 0, 123]\nnote [0, 2, 3, 5, 9, 123]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn unique l view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_34_unique.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 9 0\nput a0 0 5\nput a0 1 3\nput a0 2 5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nres = new long 4096 0\nr = unique a0 res\nif ne r 6\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 5\nret false\nend\nif ne get res 4 9\nret false\nend\nif ne get res 5 123\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_35_max_element", "language": "om", "prompt": "om2\nnote Return maximum element in the array.\nnote >>> max_element [1, 2, 3]\nnote 3\nnote >>> max_element [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote 123\nfn max_element l view long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_35_max_element.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = max_element a0\nret eq r 3\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 -3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 124\nput a0 9 1\nput a0 10 -10\nr = max_element a0\nret eq r 124\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_36_fizz_buzz", "language": "om", "prompt": "om2\nnote Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.\nnote >>> fizz_buzz 50\nnote 0\nnote >>> fizz_buzz 78\nnote 2\nnote >>> fizz_buzz 79\nnote 3\nfn fizz_buzz n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_36_fizz_buzz.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = fizz_buzz 50\nret eq r 0\nend\nfn tc_1 to bool\nr = fizz_buzz 78\nret eq r 2\nend\nfn tc_2 to bool\nr = fizz_buzz 79\nret eq r 3\nend\nfn tc_3 to bool\nr = fizz_buzz 100\nret eq r 3\nend\nfn tc_4 to bool\nr = fizz_buzz 200\nret eq r 6\nend\nfn tc_5 to bool\nr = fizz_buzz 4000\nret eq r 192\nend\nfn tc_6 to bool\nr = fizz_buzz 10000\nret eq r 639\nend\nfn tc_7 to bool\nr = fizz_buzz 100000\nret eq r 8026\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_37_sort_even", "language": "om", "prompt": "om2\nnote This function takes an array l and returns an array l' such that\nnote l' is identical to l in the odd indicies, while its values at the even indicies are equal\nnote to the values of the even indicies of l, but sorted.\nnote >>> sort_even [1, 2, 3]\nnote [1, 2, 3]\nnote >>> sort_even [5, 6, 3, 4]\nnote [3, 6, 5, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn sort_even l view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_37_sort_even.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nres = new long 4096 0\nr = sort_even a0 res\nif ne r 3\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 -3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = sort_even a0 res\nif ne r 11\nret false\nend\nif ne get res 0 -10\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 -5\nret false\nend\nif ne get res 3 2\nret false\nend\nif ne get res 4 -3\nret false\nend\nif ne get res 5 3\nret false\nend\nif ne get res 6 5\nret false\nend\nif ne get res 7 0\nret false\nend\nif ne get res 8 9\nret false\nend\nif ne get res 9 1\nret false\nend\nif ne get res 10 123\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 10 0\nput a0 0 5\nput a0 1 8\nput a0 2 -12\nput a0 3 4\nput a0 4 23\nput a0 5 2\nput a0 6 3\nput a0 7 11\nput a0 8 12\nput a0 9 -10\nres = new long 4096 0\nr = sort_even a0 res\nif ne r 10\nret false\nend\nif ne get res 0 -12\nret false\nend\nif ne get res 1 8\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 5\nret false\nend\nif ne get res 5 2\nret false\nend\nif ne get res 6 12\nret false\nend\nif ne get res 7 11\nret false\nend\nif ne get res 8 23\nret false\nend\nif ne get res 9 -10\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_39_prime_fib", "language": "om", "prompt": "om2\nnote prime_fib returns n-th number that is a Fibonacci number and it's also prime.\nnote >>> prime_fib 1\nnote 2\nnote >>> prime_fib 2\nnote 3\nnote >>> prime_fib 3\nnote 5\nnote >>> prime_fib 4\nnote 13\nnote >>> prime_fib 5\nnote 89\nfn prime_fib n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_39_prime_fib.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = prime_fib 1\nret eq r 2\nend\nfn tc_1 to bool\nr = prime_fib 2\nret eq r 3\nend\nfn tc_2 to bool\nr = prime_fib 3\nret eq r 5\nend\nfn tc_3 to bool\nr = prime_fib 4\nret eq r 13\nend\nfn tc_4 to bool\nr = prime_fib 5\nret eq r 89\nend\nfn tc_5 to bool\nr = prime_fib 6\nret eq r 233\nend\nfn tc_6 to bool\nr = prime_fib 7\nret eq r 1597\nend\nfn tc_7 to bool\nr = prime_fib 8\nret eq r 28657\nend\nfn tc_8 to bool\nr = prime_fib 9\nret eq r 514229\nend\nfn tc_9 to bool\nr = prime_fib 10\nret eq r 433494437\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_40_triples_sum_to_zero", "language": "om", "prompt": "om2\nnote triples_sum_to_zero takes an array of integers as an input.\nnote it returns true if there are three distinct elements in the array that\nnote sum to zero, and false otherwise.\nnote >>> triples_sum_to_zero [1, 3, 5, 0]\nnote false\nnote >>> triples_sum_to_zero [1, 3, -2, 1]\nnote true\nnote >>> triples_sum_to_zero [1, 2, 3, 7]\nnote false\nnote >>> triples_sum_to_zero [2, 4, -5, 3, 9, 7]\nnote true\nnote >>> triples_sum_to_zero [1]\nnote false\nfn triples_sum_to_zero l view long * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_40_triples_sum_to_zero.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 3\nput a0 2 5\nput a0 3 0\nr = triples_sum_to_zero a0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 3\nput a0 2 5\nput a0 3 -1\nr = triples_sum_to_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 3\nput a0 2 -2\nput a0 3 1\nr = triples_sum_to_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 7\nr = triples_sum_to_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 5\nput a0 3 7\nr = triples_sum_to_zero a0\nret eq r false\nend\nfn tc_5 to bool\na0 = new long 6 0\nput a0 0 2\nput a0 1 4\nput a0 2 -5\nput a0 3 3\nput a0 4 9\nput a0 5 7\nr = triples_sum_to_zero a0\nret eq r true\nend\nfn tc_6 to bool\na0 = new long 1 0\nput a0 0 1\nr = triples_sum_to_zero a0\nret eq r false\nend\nfn tc_7 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 3\nput a0 2 5\nput a0 3 -100\nr = triples_sum_to_zero a0\nret eq r false\nend\nfn tc_8 to bool\na0 = new long 4 0\nput a0 0 100\nput a0 1 3\nput a0 2 5\nput a0 3 -100\nr = triples_sum_to_zero a0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_41_car_race_collision", "language": "om", "prompt": "om2\nnote Imagine a road that's a perfectly straight infinitely long line.\nnote n cars are driving left to right; simultaneously, a different set of n cars\nnote are driving right to left. The two sets of cars start out being very far from\nnote each other. All cars move in the same speed. Two cars are said to collide\nnote when a car that's moving left to right hits a car that's moving right to left.\nnote However, the cars are infinitely sturdy and strong; as a result, they continue moving\nnote in their trajectory as if they did not collide.\nnote This function outputs the number of such collisions.\nfn car_race_collision n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_41_car_race_collision.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = car_race_collision 2\nret eq r 4\nend\nfn tc_1 to bool\nr = car_race_collision 3\nret eq r 9\nend\nfn tc_2 to bool\nr = car_race_collision 4\nret eq r 16\nend\nfn tc_3 to bool\nr = car_race_collision 8\nret eq r 64\nend\nfn tc_4 to bool\nr = car_race_collision 10\nret eq r 100\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_42_incr_list", "language": "om", "prompt": "om2\nnote Return array with elements incremented by 1.\nnote >>> incr_list [1, 2, 3]\nnote [2, 3, 4]\nnote >>> incr_list [5, 3, 5, 2, 3, 3, 9, 0, 123]\nnote [6, 4, 6, 3, 4, 4, 10, 1, 124]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn incr_list l view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_42_incr_list.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = incr_list part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 3\nput a0 1 2\nput a0 2 1\nres = new long 4096 0\nr = incr_list a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 9 0\nput a0 0 5\nput a0 1 2\nput a0 2 5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nres = new long 4096 0\nr = incr_list a0 res\nif ne r 9\nret false\nend\nif ne get res 0 6\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 4\nret false\nend\nif ne get res 5 4\nret false\nend\nif ne get res 6 10\nret false\nend\nif ne get res 7 1\nret false\nend\nif ne get res 8 124\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_43_pairs_sum_to_zero", "language": "om", "prompt": "om2\nnote pairs_sum_to_zero takes an array of integers as an input.\nnote it returns true if there are two distinct elements in the array that\nnote sum to zero, and false otherwise.\nnote >>> pairs_sum_to_zero [1, 3, 5, 0]\nnote false\nnote >>> pairs_sum_to_zero [1, 3, -2, 1]\nnote false\nnote >>> pairs_sum_to_zero [1, 2, 3, 7]\nnote false\nnote >>> pairs_sum_to_zero [2, 4, -5, 3, 5, 7]\nnote true\nnote >>> pairs_sum_to_zero [1]\nnote false\nfn pairs_sum_to_zero l view long * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_43_pairs_sum_to_zero.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 3\nput a0 2 5\nput a0 3 0\nr = pairs_sum_to_zero a0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 3\nput a0 2 -2\nput a0 3 1\nr = pairs_sum_to_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 7\nr = pairs_sum_to_zero a0\nret eq r false\nend\nfn tc_3 to bool\na0 = new long 6 0\nput a0 0 2\nput a0 1 4\nput a0 2 -5\nput a0 3 3\nput a0 4 5\nput a0 5 7\nr = pairs_sum_to_zero a0\nret eq r true\nend\nfn tc_4 to bool\na0 = new long 1 0\nput a0 0 1\nr = pairs_sum_to_zero a0\nret eq r false\nend\nfn tc_5 to bool\na0 = new long 6 0\nput a0 0 -3\nput a0 1 9\nput a0 2 -1\nput a0 3 3\nput a0 4 2\nput a0 5 30\nr = pairs_sum_to_zero a0\nret eq r true\nend\nfn tc_6 to bool\na0 = new long 6 0\nput a0 0 -3\nput a0 1 9\nput a0 2 -1\nput a0 3 3\nput a0 4 2\nput a0 5 31\nr = pairs_sum_to_zero a0\nret eq r true\nend\nfn tc_7 to bool\na0 = new long 6 0\nput a0 0 -3\nput a0 1 9\nput a0 2 -1\nput a0 3 4\nput a0 4 2\nput a0 5 30\nr = pairs_sum_to_zero a0\nret eq r false\nend\nfn tc_8 to bool\na0 = new long 6 0\nput a0 0 -3\nput a0 1 9\nput a0 2 -1\nput a0 3 4\nput a0 4 2\nput a0 5 31\nr = pairs_sum_to_zero a0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_44_change_base", "language": "om", "prompt": "om2\nnote Change numerical base of input number x to base.\nnote return string representation after the conversion.\nnote base numbers are less than 10.\nnote >>> change_base 8 3\nnote \"22\"\nnote >>> change_base 8 2\nnote \"1000\"\nnote >>> change_base 7 2\nnote \"111\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn change_base x long base long res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_44_change_base.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new uchar 4096 0\nr = change_base 8 3 res\nif ne r 2\nret false\nend\nif ne get res 0 50\nret false\nend\nif ne get res 1 50\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new uchar 4096 0\nr = change_base 9 3 res\nif ne r 3\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 48\nret false\nend\nif ne get res 2 48\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new uchar 4096 0\nr = change_base 234 2 res\nif ne r 8\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 49\nret false\nend\nif ne get res 2 49\nret false\nend\nif ne get res 3 48\nret false\nend\nif ne get res 4 49\nret false\nend\nif ne get res 5 48\nret false\nend\nif ne get res 6 49\nret false\nend\nif ne get res 7 48\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new uchar 4096 0\nr = change_base 16 2 res\nif ne r 5\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 48\nret false\nend\nif ne get res 2 48\nret false\nend\nif ne get res 3 48\nret false\nend\nif ne get res 4 48\nret false\nend\nret true\nend\nfn tc_4 to bool\nres = new uchar 4096 0\nr = change_base 8 2 res\nif ne r 4\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 48\nret false\nend\nif ne get res 2 48\nret false\nend\nif ne get res 3 48\nret false\nend\nret true\nend\nfn tc_5 to bool\nres = new uchar 4096 0\nr = change_base 7 2 res\nif ne r 3\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 49\nret false\nend\nif ne get res 2 49\nret false\nend\nret true\nend\nfn tc_6 to bool\nres = new uchar 4096 0\nr = change_base 2 3 res\nif ne r 1\nret false\nend\nif ne get res 0 50\nret false\nend\nret true\nend\nfn tc_7 to bool\nres = new uchar 4096 0\nr = change_base 3 4 res\nif ne r 1\nret false\nend\nif ne get res 0 51\nret false\nend\nret true\nend\nfn tc_8 to bool\nres = new uchar 4096 0\nr = change_base 4 5 res\nif ne r 1\nret false\nend\nif ne get res 0 52\nret false\nend\nret true\nend\nfn tc_9 to bool\nres = new uchar 4096 0\nr = change_base 5 6 res\nif ne r 1\nret false\nend\nif ne get res 0 53\nret false\nend\nret true\nend\nfn tc_10 to bool\nres = new uchar 4096 0\nr = change_base 6 7 res\nif ne r 1\nret false\nend\nif ne get res 0 54\nret false\nend\nret true\nend\nfn tc_11 to bool\nres = new uchar 4096 0\nr = change_base 7 8 res\nif ne r 1\nret false\nend\nif ne get res 0 55\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_45_triangle_area", "language": "om", "prompt": "om2\nnote Given length of a side and high return area for a triangle.\nnote >>> triangle_area 5 3\nnote 7.5\nfn triangle_area a long h long to f64\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_45_triangle_area.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = triangle_area 5 3\nret eq r 7.5\nend\nfn tc_1 to bool\nr = triangle_area 2 2\nret eq r 2.0\nend\nfn tc_2 to bool\nr = triangle_area 10 8\nret eq r 40.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_46_fib4", "language": "om", "prompt": "om2\nnote The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:\nnote fib4(0) -> 0\nnote fib4(1) -> 0\nnote fib4(2) -> 2\nnote fib4(3) -> 0\nnote fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).\nnote Please write a function to efficiently compute the n-th element of the fib4 number sequence. Do not use recursion.\nnote >>> fib4 5\nnote 4\nnote >>> fib4 6\nnote 8\nnote >>> fib4 7\nnote 14\nfn fib4 n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_46_fib4.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = fib4 5\nret eq r 4\nend\nfn tc_1 to bool\nr = fib4 8\nret eq r 28\nend\nfn tc_2 to bool\nr = fib4 10\nret eq r 104\nend\nfn tc_3 to bool\nr = fib4 12\nret eq r 386\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_47_median", "language": "om", "prompt": "om2\nnote Return median of elements in the array l.\nnote >>> median [3, 1, 2, 4, 5]\nnote 3\nnote >>> median [-10, 4, 6, 1000, 10, 20]\nnote 15.0\nfn median l view long * to f64\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_47_median.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 1\nput a0 2 2\nput a0 3 4\nput a0 4 5\nr = median a0\nret eq r 3.0\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 -10\nput a0 1 4\nput a0 2 6\nput a0 3 1000\nput a0 4 10\nput a0 5 20\nr = median a0\nret eq r 8.0\nend\nfn tc_2 to bool\na0 = new long 1 0\nput a0 0 5\nr = median a0\nret eq r 5.0\nend\nfn tc_3 to bool\na0 = new long 2 0\nput a0 0 6\nput a0 1 5\nr = median a0\nret eq r 5.5\nend\nfn tc_4 to bool\na0 = new long 7 0\nput a0 0 8\nput a0 1 1\nput a0 2 3\nput a0 3 9\nput a0 4 9\nput a0 5 2\nput a0 6 7\nr = median a0\nret eq r 7.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_48_is_palindrome", "language": "om", "prompt": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_48_is_palindrome.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_49_modp", "language": "om", "prompt": "om2\nnote Return 2^n modulo p (be aware of numerics).\nnote >>> modp 3 5\nnote 3\nnote >>> modp 1101 101\nnote 2\nnote >>> modp 0 101\nnote 1\nnote >>> modp 3 11\nnote 8\nnote >>> modp 100 101\nnote 1\nfn modp n long p long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_49_modp.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = modp 3 5\nret eq r 3\nend\nfn tc_1 to bool\nr = modp 1101 101\nret eq r 2\nend\nfn tc_2 to bool\nr = modp 0 101\nret eq r 1\nend\nfn tc_3 to bool\nr = modp 3 11\nret eq r 8\nend\nfn tc_4 to bool\nr = modp 100 101\nret eq r 1\nend\nfn tc_5 to bool\nr = modp 30 5\nret eq r 4\nend\nfn tc_6 to bool\nr = modp 31 5\nret eq r 3\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_51_remove_vowels", "language": "om", "prompt": "om2\nnote remove_vowels is a function that takes string and returns string without vowels.\nnote >>> remove_vowels \"\"\nnote \"\"\nnote >>> remove_vowels \"abcdef\"\nnote \"bcdf\"\nnote >>> remove_vowels \"aaaaa\"\nnote \"\"\nnote >>> remove_vowels \"aaBAA\"\nnote \"B\"\nnote >>> remove_vowels \"zbcd\"\nnote \"zbcd\"\nnote Omega name: text is text_ here.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn remove_vowels text_ view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_51_remove_vowels.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = remove_vowels part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"abcdef\\nghijklm\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = remove_vowels t1_0 res\nif ne r 11\nret false\nend\nif ne get res 0 98\nret false\nend\nif ne get res 1 99\nret false\nend\nif ne get res 2 100\nret false\nend\nif ne get res 3 102\nret false\nend\nif ne get res 4 10\nret false\nend\nif ne get res 5 103\nret false\nend\nif ne get res 6 104\nret false\nend\nif ne get res 7 106\nret false\nend\nif ne get res 8 107\nret false\nend\nif ne get res 9 108\nret false\nend\nif ne get res 10 109\nret false\nend\nret true\nend\ntext t2_0 \"fedcba\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = remove_vowels t2_0 res\nif ne r 4\nret false\nend\nif ne get res 0 102\nret false\nend\nif ne get res 1 100\nret false\nend\nif ne get res 2 99\nret false\nend\nif ne get res 3 98\nret false\nend\nret true\nend\ntext t3_0 \"eeeee\"\nfn tc_3 to bool\nres = new uchar 4096 0\nr = remove_vowels t3_0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t4_0 \"acBAA\"\nfn tc_4 to bool\nres = new uchar 4096 0\nr = remove_vowels t4_0 res\nif ne r 2\nret false\nend\nif ne get res 0 99\nret false\nend\nif ne get res 1 66\nret false\nend\nret true\nend\ntext t5_0 \"EcBOO\"\nfn tc_5 to bool\nres = new uchar 4096 0\nr = remove_vowels t5_0 res\nif ne r 2\nret false\nend\nif ne get res 0 99\nret false\nend\nif ne get res 1 66\nret false\nend\nret true\nend\ntext t6_0 \"ybcd\"\nfn tc_6 to bool\nres = new uchar 4096 0\nr = remove_vowels t6_0 res\nif ne r 4\nret false\nend\nif ne get res 0 121\nret false\nend\nif ne get res 1 98\nret false\nend\nif ne get res 2 99\nret false\nend\nif ne get res 3 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_52_below_threshold", "language": "om", "prompt": "om2\nnote Return true if all numbers in the array l are below threshold t.\nnote >>> below_threshold [1, 2, 4, 10] 100\nnote true\nnote >>> below_threshold [1, 20, 4, 10] 5\nnote false\nfn below_threshold l view long * t long to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_52_below_threshold.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 10\nr = below_threshold a0 100\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 20\nput a0 2 4\nput a0 3 10\nr = below_threshold a0 5\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 20\nput a0 2 4\nput a0 3 10\nr = below_threshold a0 21\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 20\nput a0 2 4\nput a0 3 10\nr = below_threshold a0 22\nret eq r true\nend\nfn tc_4 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 8\nput a0 2 4\nput a0 3 10\nr = below_threshold a0 11\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 8\nput a0 2 4\nput a0 3 10\nr = below_threshold a0 10\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_53_add", "language": "om", "prompt": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_53_add.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_54_same_chars", "language": "om", "prompt": "om2\nnote Check if two words have the same characters.\nnote >>> same_chars \"eabcdzzzz\" \"dddzzzzzzzddeddabc\"\nnote true\nnote >>> same_chars \"abcd\" \"dddddddabc\"\nnote true\nnote >>> same_chars \"dddddddabc\" \"abcd\"\nnote true\nnote >>> same_chars \"eabcd\" \"dddddddabc\"\nnote false\nnote >>> same_chars \"abcd\" \"dddddddabce\"\nnote false\nnote >>> same_chars \"eabcdzzzz\" \"dddzzzzzzzddddabc\"\nnote false\nfn same_chars s0 view uchar * s1 view uchar * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_54_same_chars.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"eabcdzzzz\"\ntext t0_1 \"dddzzzzzzzddeddabc\"\nfn tc_0 to bool\nr = same_chars t0_0 t0_1\nret eq r true\nend\ntext t1_0 \"abcd\"\ntext t1_1 \"dddddddabc\"\nfn tc_1 to bool\nr = same_chars t1_0 t1_1\nret eq r true\nend\ntext t2_0 \"dddddddabc\"\ntext t2_1 \"abcd\"\nfn tc_2 to bool\nr = same_chars t2_0 t2_1\nret eq r true\nend\ntext t3_0 \"eabcd\"\ntext t3_1 \"dddddddabc\"\nfn tc_3 to bool\nr = same_chars t3_0 t3_1\nret eq r false\nend\ntext t4_0 \"abcd\"\ntext t4_1 \"dddddddabcf\"\nfn tc_4 to bool\nr = same_chars t4_0 t4_1\nret eq r false\nend\ntext t5_0 \"eabcdzzzz\"\ntext t5_1 \"dddzzzzzzzddddabc\"\nfn tc_5 to bool\nr = same_chars t5_0 t5_1\nret eq r false\nend\ntext t6_0 \"aabb\"\ntext t6_1 \"aaccc\"\nfn tc_6 to bool\nr = same_chars t6_0 t6_1\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_55_fib", "language": "om", "prompt": "om2\nnote Return n-th Fibonacci number.\nnote >>> fib 10\nnote 55\nnote >>> fib 1\nnote 1\nnote >>> fib 8\nnote 21\nfn fib n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_55_fib.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = fib 10\nret eq r 55\nend\nfn tc_1 to bool\nr = fib 1\nret eq r 1\nend\nfn tc_2 to bool\nr = fib 8\nret eq r 21\nend\nfn tc_3 to bool\nr = fib 11\nret eq r 89\nend\nfn tc_4 to bool\nr = fib 12\nret eq r 144\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_56_correct_bracketing", "language": "om", "prompt": "om2\nnote brackets is a string of \"<\" and \">\".\nnote return true if every opening bracket has a corresponding closing bracket.\nnote >>> correct_bracketing \"<\"\nnote false\nnote >>> correct_bracketing \"<>\"\nnote true\nnote >>> correct_bracketing \"<<><>>\"\nnote true\nnote >>> correct_bracketing \"><<>\"\nnote false\nfn correct_bracketing brackets view uchar * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_56_correct_bracketing.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"<>\"\nfn tc_0 to bool\nr = correct_bracketing t0_0\nret eq r true\nend\ntext t1_0 \"<<><>>\"\nfn tc_1 to bool\nr = correct_bracketing t1_0\nret eq r true\nend\ntext t2_0 \"<><><<><>><>\"\nfn tc_2 to bool\nr = correct_bracketing t2_0\nret eq r true\nend\ntext t3_0 \"<><><<<><><>><>><<><><<>>>\"\nfn tc_3 to bool\nr = correct_bracketing t3_0\nret eq r true\nend\ntext t4_0 \"<<<><>>>>\"\nfn tc_4 to bool\nr = correct_bracketing t4_0\nret eq r false\nend\ntext t5_0 \"><<>\"\nfn tc_5 to bool\nr = correct_bracketing t5_0\nret eq r false\nend\ntext t6_0 \"<\"\nfn tc_6 to bool\nr = correct_bracketing t6_0\nret eq r false\nend\ntext t7_0 \"<<<<\"\nfn tc_7 to bool\nr = correct_bracketing t7_0\nret eq r false\nend\ntext t8_0 \">\"\nfn tc_8 to bool\nr = correct_bracketing t8_0\nret eq r false\nend\ntext t9_0 \"<<>\"\nfn tc_9 to bool\nr = correct_bracketing t9_0\nret eq r false\nend\ntext t10_0 \"<><><<><>><>><<>\"\nfn tc_10 to bool\nr = correct_bracketing t10_0\nret eq r false\nend\ntext t11_0 \"<><><<><>><>>><>\"\nfn tc_11 to bool\nr = correct_bracketing t11_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_57_monotonic", "language": "om", "prompt": "om2\nnote Return true is array elements are monotonically increasing or decreasing.\nnote >>> monotonic [1, 2, 4, 20]\nnote true\nnote >>> monotonic [1, 20, 4, 10]\nnote false\nnote >>> monotonic [4, 1, 0, -10]\nnote true\nfn monotonic l view long * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_57_monotonic.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 10\nr = monotonic a0\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 20\nr = monotonic a0\nret eq r true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 20\nput a0 2 4\nput a0 3 10\nr = monotonic a0\nret eq r false\nend\nfn tc_3 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 1\nput a0 2 0\nput a0 3 -10\nr = monotonic a0\nret eq r true\nend\nfn tc_4 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 1\nput a0 2 1\nput a0 3 0\nr = monotonic a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 2\nput a0 4 5\nput a0 5 60\nr = monotonic a0\nret eq r false\nend\nfn tc_6 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 60\nr = monotonic a0\nret eq r true\nend\nfn tc_7 to bool\na0 = new long 4 0\nput a0 0 9\nput a0 1 9\nput a0 2 9\nput a0 3 9\nr = monotonic a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_58_common", "language": "om", "prompt": "om2\nnote Return sorted unique common elements for two lists.\nnote >>> common [1, 4, 3, 34, 653, 2, 5] [5, 7, 1, 5, 9, 653, 121]\nnote [1, 5, 653]\nnote >>> common [5, 3, 2, 8] [3, 2]\nnote [2, 3]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn common l1 view long * l2 view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_58_common.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 4\nput a0 2 3\nput a0 3 34\nput a0 4 653\nput a0 5 2\nput a0 6 5\na1 = new long 7 0\nput a1 0 5\nput a1 1 7\nput a1 2 1\nput a1 3 5\nput a1 4 9\nput a1 5 653\nput a1 6 121\nres = new long 4096 0\nr = common a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 653\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 5\nput a0 1 3\nput a0 2 2\nput a0 3 8\na1 = new long 2 0\nput a1 0 3\nput a1 1 2\nres = new long 4096 0\nr = common a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 8\na1 = new long 3 0\nput a1 0 3\nput a1 1 2\nput a1 2 4\nres = new long 4096 0\nr = common a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 8\na1 = new long 1 0\nres = new long 4096 0\nr = common a0 part a1 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_59_largest_prime_factor", "language": "om", "prompt": "om2\nnote Return the largest prime factor of n. Assume n > 1 and is not a prime.\nnote >>> largest_prime_factor 13195\nnote 29\nnote >>> largest_prime_factor 2048\nnote 2\nfn largest_prime_factor n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_59_largest_prime_factor.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = largest_prime_factor 15\nret eq r 5\nend\nfn tc_1 to bool\nr = largest_prime_factor 27\nret eq r 3\nend\nfn tc_2 to bool\nr = largest_prime_factor 63\nret eq r 7\nend\nfn tc_3 to bool\nr = largest_prime_factor 330\nret eq r 11\nend\nfn tc_4 to bool\nr = largest_prime_factor 13195\nret eq r 29\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_60_sum_to_n", "language": "om", "prompt": "om2\nnote sum_to_n is a function that sums numbers from 1 to n.\nnote >>> sum_to_n 30\nnote 465\nnote >>> sum_to_n 100\nnote 5050\nnote >>> sum_to_n 5\nnote 15\nnote >>> sum_to_n 10\nnote 55\nnote >>> sum_to_n 1\nnote 1\nfn sum_to_n n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_60_sum_to_n.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = sum_to_n 1\nret eq r 1\nend\nfn tc_1 to bool\nr = sum_to_n 6\nret eq r 21\nend\nfn tc_2 to bool\nr = sum_to_n 11\nret eq r 66\nend\nfn tc_3 to bool\nr = sum_to_n 30\nret eq r 465\nend\nfn tc_4 to bool\nr = sum_to_n 100\nret eq r 5050\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_61_correct_bracketing", "language": "om", "prompt": "om2\nnote brackets is a string of \"(\" and \")\".\nnote return true if every opening bracket has a corresponding closing bracket.\nnote >>> correct_bracketing \"(\"\nnote false\nnote >>> correct_bracketing \"()\"\nnote true\nnote >>> correct_bracketing \"(()())\"\nnote true\nnote >>> correct_bracketing \")(()\"\nnote false\nfn correct_bracketing brackets view uchar * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_61_correct_bracketing.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"()\"\nfn tc_0 to bool\nr = correct_bracketing t0_0\nret eq r true\nend\ntext t1_0 \"(()())\"\nfn tc_1 to bool\nr = correct_bracketing t1_0\nret eq r true\nend\ntext t2_0 \"()()(()())()\"\nfn tc_2 to bool\nr = correct_bracketing t2_0\nret eq r true\nend\ntext t3_0 \"()()((()()())())(()()(()))\"\nfn tc_3 to bool\nr = correct_bracketing t3_0\nret eq r true\nend\ntext t4_0 \"((()())))\"\nfn tc_4 to bool\nr = correct_bracketing t4_0\nret eq r false\nend\ntext t5_0 \")(()\"\nfn tc_5 to bool\nr = correct_bracketing t5_0\nret eq r false\nend\ntext t6_0 \"(\"\nfn tc_6 to bool\nr = correct_bracketing t6_0\nret eq r false\nend\ntext t7_0 \"((((\"\nfn tc_7 to bool\nr = correct_bracketing t7_0\nret eq r false\nend\ntext t8_0 \")\"\nfn tc_8 to bool\nr = correct_bracketing t8_0\nret eq r false\nend\ntext t9_0 \"(()\"\nfn tc_9 to bool\nr = correct_bracketing t9_0\nret eq r false\nend\ntext t10_0 \"()()(()())())(()\"\nfn tc_10 to bool\nr = correct_bracketing t10_0\nret eq r false\nend\ntext t11_0 \"()()(()())()))()\"\nfn tc_11 to bool\nr = correct_bracketing t11_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_62_derivative", "language": "om", "prompt": "om2\nnote xs represent coefficients of a polynomial.\nnote xs[0] + xs[1] * x + xs[2] * x^2 + ....\nnote Return derivative of this polynomial in the same form.\nnote >>> derivative [3, 1, 2, 4, 5]\nnote [1, 4, 12, 20]\nnote >>> derivative [1, 2, 3]\nnote [2, 6]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn derivative xs view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_62_derivative.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 1\nput a0 2 2\nput a0 3 4\nput a0 4 5\nres = new long 4096 0\nr = derivative a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 12\nret false\nend\nif ne get res 3 20\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nres = new long 4096 0\nr = derivative a0 res\nif ne r 2\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 6\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 3\nput a0 1 2\nput a0 2 1\nres = new long 4096 0\nr = derivative a0 res\nif ne r 2\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 2\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 1\nput a0 3 0\nput a0 4 4\nres = new long 4096 0\nr = derivative a0 res\nif ne r 4\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 0\nret false\nend\nif ne get res 3 16\nret false\nend\nret true\nend\nfn tc_4 to bool\na0 = new long 1 0\nput a0 0 1\nres = new long 4096 0\nr = derivative a0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_63_fibfib", "language": "om", "prompt": "om2\nnote The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:\nnote fibfib(0) == 0\nnote fibfib(1) == 0\nnote fibfib(2) == 1\nnote fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).\nnote Please write a function to efficiently compute the n-th element of the fibfib number sequence.\nnote >>> fibfib 1\nnote 0\nnote >>> fibfib 5\nnote 4\nnote >>> fibfib 8\nnote 24\nfn fibfib n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_63_fibfib.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = fibfib 2\nret eq r 1\nend\nfn tc_1 to bool\nr = fibfib 1\nret eq r 0\nend\nfn tc_2 to bool\nr = fibfib 5\nret eq r 4\nend\nfn tc_3 to bool\nr = fibfib 8\nret eq r 24\nend\nfn tc_4 to bool\nr = fibfib 10\nret eq r 81\nend\nfn tc_5 to bool\nr = fibfib 12\nret eq r 274\nend\nfn tc_6 to bool\nr = fibfib 14\nret eq r 927\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_64_vowels_count", "language": "om", "prompt": "om2\nnote Write a function vowels_count which takes a string representing\nnote a word as input and returns the number of vowels in the string.\nnote Vowels in this case are 'a', 'e', 'i', 'o', 'u'. Here, 'y' is also a\nnote vowel, but only when it is at the end of the given word.\nnote Example:\nnote >>> vowels_count \"abcde\"\nnote 2\nnote >>> vowels_count \"ACEDY\"\nnote 3\nfn vowels_count s view uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_64_vowels_count.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"abcde\"\nfn tc_0 to bool\nr = vowels_count t0_0\nret eq r 2\nend\ntext t1_0 \"Alone\"\nfn tc_1 to bool\nr = vowels_count t1_0\nret eq r 3\nend\ntext t2_0 \"key\"\nfn tc_2 to bool\nr = vowels_count t2_0\nret eq r 2\nend\ntext t3_0 \"bye\"\nfn tc_3 to bool\nr = vowels_count t3_0\nret eq r 1\nend\ntext t4_0 \"keY\"\nfn tc_4 to bool\nr = vowels_count t4_0\nret eq r 2\nend\ntext t5_0 \"bYe\"\nfn tc_5 to bool\nr = vowels_count t5_0\nret eq r 1\nend\ntext t6_0 \"ACEDY\"\nfn tc_6 to bool\nr = vowels_count t6_0\nret eq r 3\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_65_circular_shift", "language": "om", "prompt": "om2\nnote Circular shift the digits of the integer x, shift the digits right by shift\nnote and return the result as a string.\nnote If shift > number of digits, return digits reversed.\nnote >>> circular_shift 12 1\nnote \"21\"\nnote >>> circular_shift 12 2\nnote \"12\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn circular_shift x long shift long res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_65_circular_shift.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new uchar 4096 0\nr = circular_shift 100 2 res\nif ne r 3\nret false\nend\nif ne get res 0 48\nret false\nend\nif ne get res 1 48\nret false\nend\nif ne get res 2 49\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new uchar 4096 0\nr = circular_shift 12 2 res\nif ne r 2\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 50\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new uchar 4096 0\nr = circular_shift 97 8 res\nif ne r 2\nret false\nend\nif ne get res 0 55\nret false\nend\nif ne get res 1 57\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new uchar 4096 0\nr = circular_shift 12 1 res\nif ne r 2\nret false\nend\nif ne get res 0 50\nret false\nend\nif ne get res 1 49\nret false\nend\nret true\nend\nfn tc_4 to bool\nres = new uchar 4096 0\nr = circular_shift 11 101 res\nif ne r 2\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 49\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_66_digitSum", "language": "om", "prompt": "om2\nnote Task\nnote Write a function that takes a string as input and returns the sum of the upper characters only'\nnote ASCII codes.\nnote Examples:\nnote >>> digitSum \"\"\nnote 0\nnote >>> digitSum \"abAB\"\nnote 131\nnote >>> digitSum \"abcCd\"\nnote 67\nnote >>> digitSum \"helloE\"\nnote 69\nnote >>> digitSum \"woArBld\"\nnote 131\nnote >>> digitSum \"aAaaaXa\"\nnote 153\nfn digitSum s view uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_66_digitSum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = digitSum part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abAB\"\nfn tc_1 to bool\nr = digitSum t1_0\nret eq r 131\nend\ntext t2_0 \"abcCd\"\nfn tc_2 to bool\nr = digitSum t2_0\nret eq r 67\nend\ntext t3_0 \"helloE\"\nfn tc_3 to bool\nr = digitSum t3_0\nret eq r 69\nend\ntext t4_0 \"woArBld\"\nfn tc_4 to bool\nr = digitSum t4_0\nret eq r 131\nend\ntext t5_0 \"aAaaaXa\"\nfn tc_5 to bool\nr = digitSum t5_0\nret eq r 153\nend\ntext t6_0 \" How are yOu?\"\nfn tc_6 to bool\nr = digitSum t6_0\nret eq r 151\nend\ntext t7_0 \"You arE Very Smart\"\nfn tc_7 to bool\nr = digitSum t7_0\nret eq r 327\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_67_fruit_distribution", "language": "om", "prompt": "om2\nnote In this task, you will be given a string that represents a number of apples and oranges\nnote that are distributed in a basket of fruit this basket contains\nnote apples, oranges, and mango fruits. Given the string that represents the total number of\nnote the oranges and apples and an integer that represent the total number of the fruits\nnote in the basket return the number of the mango fruits in the basket.\nnote for examble:\nnote >>> fruit_distribution \"5 apples and 6 oranges\" 19\nnote 8\nnote >>> fruit_distribution \"0 apples and 1 oranges\" 3\nnote 2\nnote >>> fruit_distribution \"2 apples and 3 oranges\" 100\nnote 95\nnote >>> fruit_distribution \"100 apples and 1 oranges\" 120\nnote 19\nfn fruit_distribution s view uchar * n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_67_fruit_distribution.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"5 apples and 6 oranges\"\nfn tc_0 to bool\nr = fruit_distribution t0_0 19\nret eq r 8\nend\ntext t1_0 \"5 apples and 6 oranges\"\nfn tc_1 to bool\nr = fruit_distribution t1_0 21\nret eq r 10\nend\ntext t2_0 \"0 apples and 1 oranges\"\nfn tc_2 to bool\nr = fruit_distribution t2_0 3\nret eq r 2\nend\ntext t3_0 \"1 apples and 0 oranges\"\nfn tc_3 to bool\nr = fruit_distribution t3_0 3\nret eq r 2\nend\ntext t4_0 \"2 apples and 3 oranges\"\nfn tc_4 to bool\nr = fruit_distribution t4_0 100\nret eq r 95\nend\ntext t5_0 \"2 apples and 3 oranges\"\nfn tc_5 to bool\nr = fruit_distribution t5_0 5\nret eq r 0\nend\ntext t6_0 \"1 apples and 100 oranges\"\nfn tc_6 to bool\nr = fruit_distribution t6_0 120\nret eq r 19\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_68_pluck", "language": "om", "prompt": "om2\nnote \"Given an array representing a branch of a tree that has non-negative integer nodes\nnote your task is to pluck one of the nodes and return it.\nnote The plucked node should be the node with the smallest even value.\nnote If multiple nodes with the same smallest even value are found return the node that has smallest index.\nnote The plucked node should be returned in an array, [ smalest_value, its index ],\nnote If there are no even values or the given array is empty, return [].\nnote Example 1:\nnote >>> pluck [4, 2, 3]\nnote [2, 1]\nnote Explanation: 2 has the smallest even value, and 2 has the smallest index.\nnote Example 2:\nnote >>> pluck [1, 2, 3]\nnote [2, 1]\nnote Explanation: 2 has the smallest even value, and 2 has the smallest index.\nnote Example 3:\nnote >>> pluck []\nnote []\nnote Example 4:\nnote >>> pluck [5, 0, 3, 0, 4, 2]\nnote [0, 1]\nnote Explanation: 0 is the smallest value, but there are two zeros,\nnote so we will choose the first zero, which has the smallest index.\nnote Constraints:\nnote * 1 <= nodes.length <= 10000\nnote * 0 <= node.value\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn pluck arr view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_68_pluck.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 4\nput a0 1 2\nput a0 2 3\nres = new long 4096 0\nr = pluck a0 res\nif ne r 2\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 1\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nres = new long 4096 0\nr = pluck a0 res\nif ne r 2\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = pluck part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 6 0\nput a0 0 5\nput a0 1 0\nput a0 2 3\nput a0 3 0\nput a0 4 4\nput a0 5 2\nres = new long 4096 0\nr = pluck a0 res\nif ne r 2\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 1\nret false\nend\nret true\nend\nfn tc_4 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 0\nput a0 4 5\nput a0 5 3\nres = new long 4096 0\nr = pluck a0 res\nif ne r 2\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 3\nret false\nend\nret true\nend\nfn tc_5 to bool\na0 = new long 5 0\nput a0 0 5\nput a0 1 4\nput a0 2 8\nput a0 3 4\nput a0 4 8\nres = new long 4096 0\nr = pluck a0 res\nif ne r 2\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 1\nret false\nend\nret true\nend\nfn tc_6 to bool\na0 = new long 4 0\nput a0 0 7\nput a0 1 6\nput a0 2 7\nput a0 3 1\nres = new long 4096 0\nr = pluck a0 res\nif ne r 2\nret false\nend\nif ne get res 0 6\nret false\nend\nif ne get res 1 1\nret false\nend\nret true\nend\nfn tc_7 to bool\na0 = new long 4 0\nput a0 0 7\nput a0 1 9\nput a0 2 7\nput a0 3 1\nres = new long 4096 0\nr = pluck a0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_69_search", "language": "om", "prompt": "om2\nnote You are given a non-empty array of positive integers. Return the greatest integer that is greater than\nnote zero, and has a frequency greater than or equal to the value of the integer itself.\nnote The frequency of an integer is the number of times it appears in the array.\nnote If no such a value exist, return -1.\nnote Examples:\nnote >>> search [4, 1, 2, 2, 3, 1]\nnote 2\nnote >>> search [1, 2, 2, 3, 3, 3, 4, 4, 4]\nnote 3\nnote >>> search [5, 5, 4, 4, 4]\nnote -1\nfn search lst view long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_69_search.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 5\nput a0 1 5\nput a0 2 5\nput a0 3 5\nput a0 4 1\nr = search a0\nret eq r 1\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 4\nput a0 1 1\nput a0 2 4\nput a0 3 1\nput a0 4 4\nput a0 5 4\nr = search a0\nret eq r 4\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 3\nput a0 1 3\nr = search a0\nret eq r -1\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 8\nput a0 1 8\nput a0 2 8\nput a0 3 8\nput a0 4 8\nput a0 5 8\nput a0 6 8\nput a0 7 8\nr = search a0\nret eq r 8\nend\nfn tc_4 to bool\na0 = new long 5 0\nput a0 0 2\nput a0 1 3\nput a0 2 3\nput a0 3 2\nput a0 4 2\nr = search a0\nret eq r 2\nend\nfn tc_5 to bool\na0 = new long 22 0\nput a0 0 2\nput a0 1 7\nput a0 2 8\nput a0 3 8\nput a0 4 4\nput a0 5 8\nput a0 6 7\nput a0 7 3\nput a0 8 9\nput a0 9 6\nput a0 10 5\nput a0 11 10\nput a0 12 4\nput a0 13 3\nput a0 14 6\nput a0 15 7\nput a0 16 1\nput a0 17 7\nput a0 18 4\nput a0 19 10\nput a0 20 8\nput a0 21 1\nr = search a0\nret eq r 1\nend\nfn tc_6 to bool\na0 = new long 4 0\nput a0 0 3\nput a0 1 2\nput a0 2 8\nput a0 3 2\nr = search a0\nret eq r 2\nend\nfn tc_7 to bool\na0 = new long 11 0\nput a0 0 6\nput a0 1 7\nput a0 2 1\nput a0 3 8\nput a0 4 8\nput a0 5 10\nput a0 6 5\nput a0 7 8\nput a0 8 5\nput a0 9 3\nput a0 10 10\nr = search a0\nret eq r 1\nend\nfn tc_8 to bool\na0 = new long 7 0\nput a0 0 8\nput a0 1 8\nput a0 2 3\nput a0 3 6\nput a0 4 5\nput a0 5 6\nput a0 6 4\nr = search a0\nret eq r -1\nend\nfn tc_9 to bool\na0 = new long 25 0\nput a0 0 6\nput a0 1 9\nput a0 2 6\nput a0 3 7\nput a0 4 1\nput a0 5 4\nput a0 6 7\nput a0 7 1\nput a0 8 8\nput a0 9 8\nput a0 10 9\nput a0 11 8\nput a0 12 10\nput a0 13 10\nput a0 14 8\nput a0 15 4\nput a0 16 10\nput a0 17 4\nput a0 18 10\nput a0 19 1\nput a0 20 2\nput a0 21 9\nput a0 22 5\nput a0 23 7\nput a0 24 9\nr = search a0\nret eq r 1\nend\nfn tc_10 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 9\nput a0 2 10\nput a0 3 1\nput a0 4 3\nr = search a0\nret eq r 1\nend\nfn tc_11 to bool\na0 = new long 24 0\nput a0 0 6\nput a0 1 9\nput a0 2 7\nput a0 3 5\nput a0 4 8\nput a0 5 7\nput a0 6 5\nput a0 7 3\nput a0 8 7\nput a0 9 5\nput a0 10 10\nput a0 11 10\nput a0 12 3\nput a0 13 6\nput a0 14 10\nput a0 15 2\nput a0 16 8\nput a0 17 6\nput a0 18 5\nput a0 19 4\nput a0 20 9\nput a0 21 5\nput a0 22 3\nput a0 23 10\nr = search a0\nret eq r 5\nend\nfn tc_12 to bool\na0 = new long 1 0\nput a0 0 1\nr = search a0\nret eq r 1\nend\nfn tc_13 to bool\na0 = new long 23 0\nput a0 0 8\nput a0 1 8\nput a0 2 10\nput a0 3 6\nput a0 4 4\nput a0 5 3\nput a0 6 5\nput a0 7 8\nput a0 8 2\nput a0 9 4\nput a0 10 2\nput a0 11 8\nput a0 12 4\nput a0 13 6\nput a0 14 10\nput a0 15 4\nput a0 16 2\nput a0 17 1\nput a0 18 10\nput a0 19 2\nput a0 20 1\nput a0 21 1\nput a0 22 5\nr = search a0\nret eq r 4\nend\nfn tc_14 to bool\na0 = new long 18 0\nput a0 0 2\nput a0 1 10\nput a0 2 4\nput a0 3 8\nput a0 4 2\nput a0 5 10\nput a0 6 5\nput a0 7 1\nput a0 8 2\nput a0 9 9\nput a0 10 5\nput a0 11 5\nput a0 12 6\nput a0 13 3\nput a0 14 8\nput a0 15 6\nput a0 16 4\nput a0 17 10\nr = search a0\nret eq r 2\nend\nfn tc_15 to bool\na0 = new long 12 0\nput a0 0 1\nput a0 1 6\nput a0 2 10\nput a0 3 1\nput a0 4 6\nput a0 5 9\nput a0 6 10\nput a0 7 8\nput a0 8 6\nput a0 9 8\nput a0 10 7\nput a0 11 3\nr = search a0\nret eq r 1\nend\nfn tc_16 to bool\na0 = new long 30 0\nput a0 0 9\nput a0 1 2\nput a0 2 4\nput a0 3 1\nput a0 4 5\nput a0 5 1\nput a0 6 5\nput a0 7 2\nput a0 8 5\nput a0 9 7\nput a0 10 7\nput a0 11 7\nput a0 12 3\nput a0 13 10\nput a0 14 1\nput a0 15 5\nput a0 16 4\nput a0 17 2\nput a0 18 8\nput a0 19 4\nput a0 20 1\nput a0 21 9\nput a0 22 10\nput a0 23 7\nput a0 24 10\nput a0 25 2\nput a0 26 8\nput a0 27 10\nput a0 28 9\nput a0 29 4\nr = search a0\nret eq r 4\nend\nfn tc_17 to bool\na0 = new long 23 0\nput a0 0 2\nput a0 1 6\nput a0 2 4\nput a0 3 2\nput a0 4 8\nput a0 5 7\nput a0 6 5\nput a0 7 6\nput a0 8 4\nput a0 9 10\nput a0 10 4\nput a0 11 6\nput a0 12 3\nput a0 13 7\nput a0 14 8\nput a0 15 8\nput a0 16 3\nput a0 17 1\nput a0 18 4\nput a0 19 2\nput a0 20 2\nput a0 21 10\nput a0 22 7\nr = search a0\nret eq r 4\nend\nfn tc_18 to bool\na0 = new long 18 0\nput a0 0 9\nput a0 1 8\nput a0 2 6\nput a0 3 10\nput a0 4 2\nput a0 5 6\nput a0 6 10\nput a0 7 2\nput a0 8 7\nput a0 9 8\nput a0 10 10\nput a0 11 3\nput a0 12 8\nput a0 13 2\nput a0 14 6\nput a0 15 2\nput a0 16 3\nput a0 17 1\nr = search a0\nret eq r 2\nend\nfn tc_19 to bool\na0 = new long 21 0\nput a0 0 5\nput a0 1 5\nput a0 2 3\nput a0 3 9\nput a0 4 5\nput a0 5 6\nput a0 6 3\nput a0 7 2\nput a0 8 8\nput a0 9 5\nput a0 10 6\nput a0 11 10\nput a0 12 10\nput a0 13 6\nput a0 14 8\nput a0 15 4\nput a0 16 10\nput a0 17 7\nput a0 18 7\nput a0 19 10\nput a0 20 8\nr = search a0\nret eq r -1\nend\nfn tc_20 to bool\na0 = new long 1 0\nput a0 0 10\nr = search a0\nret eq r -1\nend\nfn tc_21 to bool\na0 = new long 13 0\nput a0 0 9\nput a0 1 7\nput a0 2 7\nput a0 3 2\nput a0 4 4\nput a0 5 7\nput a0 6 2\nput a0 7 10\nput a0 8 9\nput a0 9 7\nput a0 10 5\nput a0 11 7\nput a0 12 2\nr = search a0\nret eq r 2\nend\nfn tc_22 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 4\nput a0 2 10\nput a0 3 2\nput a0 4 1\nput a0 5 1\nput a0 6 10\nput a0 7 3\nput a0 8 6\nput a0 9 1\nput a0 10 8\nr = search a0\nret eq r 1\nend\nfn tc_23 to bool\na0 = new long 22 0\nput a0 0 7\nput a0 1 9\nput a0 2 9\nput a0 3 9\nput a0 4 3\nput a0 5 4\nput a0 6 1\nput a0 7 5\nput a0 8 9\nput a0 9 1\nput a0 10 2\nput a0 11 1\nput a0 12 1\nput a0 13 10\nput a0 14 7\nput a0 15 5\nput a0 16 6\nput a0 17 7\nput a0 18 6\nput a0 19 7\nput a0 20 7\nput a0 21 6\nr = search a0\nret eq r 1\nend\nfn tc_24 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 10\nput a0 2 10\nput a0 3 9\nput a0 4 2\nr = search a0\nret eq r -1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nif not tc_12\nret 13\nend\nif not tc_13\nret 14\nend\nif not tc_14\nret 15\nend\nif not tc_15\nret 16\nend\nif not tc_16\nret 17\nend\nif not tc_17\nret 18\nend\nif not tc_18\nret 19\nend\nif not tc_19\nret 20\nend\nif not tc_20\nret 21\nend\nif not tc_21\nret 22\nend\nif not tc_22\nret 23\nend\nif not tc_23\nret 24\nend\nif not tc_24\nret 25\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_70_strange_sort_list", "language": "om", "prompt": "om2\nnote Given array of integers, return array in strange order.\nnote Strange sorting, is when you start with the minimum value,\nnote then maximum of the remaining integers, then minimum and so on.\nnote Examples:\nnote >>> strange_sort_list [1, 2, 3, 4]\nnote [1, 4, 2, 3]\nnote >>> strange_sort_list [5, 5, 5, 5]\nnote [5, 5, 5, 5]\nnote >>> strange_sort_list []\nnote []\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn strange_sort_list lst view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_70_strange_sort_list.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = strange_sort_list a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 5\nput a0 1 6\nput a0 2 7\nput a0 3 8\nput a0 4 9\nres = new long 4096 0\nr = strange_sort_list a0 res\nif ne r 5\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 9\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 8\nret false\nend\nif ne get res 4 7\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nres = new long 4096 0\nr = strange_sort_list a0 res\nif ne r 5\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 3\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 6 0\nput a0 0 5\nput a0 1 6\nput a0 2 7\nput a0 3 8\nput a0 4 9\nput a0 5 1\nres = new long 4096 0\nr = strange_sort_list a0 res\nif ne r 6\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 9\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 8\nret false\nend\nif ne get res 4 6\nret false\nend\nif ne get res 5 7\nret false\nend\nret true\nend\nfn tc_4 to bool\na0 = new long 4 0\nput a0 0 5\nput a0 1 5\nput a0 2 5\nput a0 3 5\nres = new long 4096 0\nr = strange_sort_list a0 res\nif ne r 4\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 5\nret false\nend\nret true\nend\nfn tc_5 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = strange_sort_list part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_6 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nres = new long 4096 0\nr = strange_sort_list a0 res\nif ne r 8\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 8\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 7\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 6\nret false\nend\nif ne get res 6 4\nret false\nend\nif ne get res 7 5\nret false\nend\nret true\nend\nfn tc_7 to bool\na0 = new long 8 0\nput a0 0 0\nput a0 1 2\nput a0 2 2\nput a0 3 2\nput a0 4 5\nput a0 5 5\nput a0 6 -5\nput a0 7 -5\nres = new long 4096 0\nr = strange_sort_list a0 res\nif ne r 8\nret false\nend\nif ne get res 0 -5\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 -5\nret false\nend\nif ne get res 3 5\nret false\nend\nif ne get res 4 0\nret false\nend\nif ne get res 5 2\nret false\nend\nif ne get res 6 2\nret false\nend\nif ne get res 7 2\nret false\nend\nret true\nend\nfn tc_8 to bool\na0 = new long 1 0\nput a0 0 111111\nres = new long 4096 0\nr = strange_sort_list a0 res\nif ne r 1\nret false\nend\nif ne get res 0 111111\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_71_triangle_area", "language": "om", "prompt": "om2\nnote Given the lengths of the three sides of a triangle. Return the area of\nnote the triangle rounded to 2 decimal points if the three sides form a valid triangle.\nnote Otherwise return -1\nnote Three sides make a valid triangle when the sum of any two sides is greater\nnote than the third side.\nnote Example:\nnote >>> triangle_area 3 4 5\nnote 6.0\nnote >>> triangle_area 1 2 10\nnote -1\nfn triangle_area a long b long c long to f64\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_71_triangle_area.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = triangle_area 3 4 5\nret eq r 6.0\nend\nfn tc_1 to bool\nr = triangle_area 1 2 10\nret eq r -1.0\nend\nfn tc_2 to bool\nr = triangle_area 4 8 5\nret eq r 8.18\nend\nfn tc_3 to bool\nr = triangle_area 2 2 2\nret eq r 1.73\nend\nfn tc_4 to bool\nr = triangle_area 1 2 3\nret eq r -1.0\nend\nfn tc_5 to bool\nr = triangle_area 10 5 7\nret eq r 16.25\nend\nfn tc_6 to bool\nr = triangle_area 2 6 3\nret eq r -1.0\nend\nfn tc_7 to bool\nr = triangle_area 1 1 1\nret eq r 0.43\nend\nfn tc_8 to bool\nr = triangle_area 2 2 10\nret eq r -1.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_72_will_it_fly", "language": "om", "prompt": "om2\nnote Write a function that returns true if the object q will fly, and false otherwise.\nnote The object q will fly if it's balanced (it is a palindromic array) and the sum of its elements is less than or equal the maximum possible weight w.\nnote Example:\nnote >>> will_it_fly [1, 2] 5\nnote false\nnote # 1+2 is less than the maximum possible weight, but it's unbalanced.\nnote >>> will_it_fly [3, 2, 3] 1\nnote false\nnote # it's balanced, but 3+2+3 is more than the maximum possible weight.\nnote >>> will_it_fly [3, 2, 3] 9\nnote true\nnote # 3+2+3 is less than the maximum possible weight, and it's balanced.\nnote >>> will_it_fly [3] 5\nnote true\nnote # 3 is less than the maximum possible weight, and it's balanced.\nnote Omega name: w is w_ here.\nfn will_it_fly q view long * w_ long to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_72_will_it_fly.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nr = will_it_fly a0 9\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 2 0\nput a0 0 1\nput a0 1 2\nr = will_it_fly a0 5\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 1 0\nput a0 0 3\nr = will_it_fly a0 5\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 3 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nr = will_it_fly a0 1\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = will_it_fly a0 6\nret eq r false\nend\nfn tc_5 to bool\na0 = new long 1 0\nput a0 0 5\nr = will_it_fly a0 5\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_73_smallest_change", "language": "om", "prompt": "om2\nnote Given an array arr of integers, find the minimum number of elements that\nnote need to be changed to make the array palindromic. A palindromic array is an array that\nnote is read the same backwards and forwards. In one change, you can change one element to any other element.\nnote For example:\nnote >>> smallest_change [1, 2, 3, 5, 4, 7, 9, 6]\nnote 4\nnote >>> smallest_change [1, 2, 3, 4, 3, 2, 2]\nnote 1\nnote >>> smallest_change [1, 2, 3, 2, 1]\nnote 0\nfn smallest_change arr view long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_73_smallest_change.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 5\nput a0 4 4\nput a0 5 7\nput a0 6 9\nput a0 7 6\nr = smallest_change a0\nret eq r 4\nend\nfn tc_1 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 3\nput a0 5 2\nput a0 6 2\nr = smallest_change a0\nret eq r 1\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 4\nput a0 2 2\nr = smallest_change a0\nret eq r 1\nend\nfn tc_3 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 4\nput a0 2 4\nput a0 3 2\nr = smallest_change a0\nret eq r 1\nend\nfn tc_4 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 2\nput a0 4 1\nr = smallest_change a0\nret eq r 0\nend\nfn tc_5 to bool\na0 = new long 4 0\nput a0 0 3\nput a0 1 1\nput a0 2 1\nput a0 3 3\nr = smallest_change a0\nret eq r 0\nend\nfn tc_6 to bool\na0 = new long 1 0\nput a0 0 1\nr = smallest_change a0\nret eq r 0\nend\nfn tc_7 to bool\na0 = new long 2 0\nput a0 0 0\nput a0 1 1\nr = smallest_change a0\nret eq r 1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_75_is_multiply_prime", "language": "om", "prompt": "om2\nnote Write a function that returns true if the given number is the multiplication of 3 prime numbers\nnote and false otherwise.\nnote Knowing that (a) is less then 100.\nnote Example:\nnote >>> is_multiply_prime 30\nnote true\nnote 30 = 2 * 3 * 5\nfn is_multiply_prime a long to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_75_is_multiply_prime.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_multiply_prime 5\nret eq r false\nend\nfn tc_1 to bool\nr = is_multiply_prime 30\nret eq r true\nend\nfn tc_2 to bool\nr = is_multiply_prime 8\nret eq r true\nend\nfn tc_3 to bool\nr = is_multiply_prime 10\nret eq r false\nend\nfn tc_4 to bool\nr = is_multiply_prime 125\nret eq r true\nend\nfn tc_5 to bool\nr = is_multiply_prime 105\nret eq r true\nend\nfn tc_6 to bool\nr = is_multiply_prime 126\nret eq r false\nend\nfn tc_7 to bool\nr = is_multiply_prime 729\nret eq r false\nend\nfn tc_8 to bool\nr = is_multiply_prime 891\nret eq r false\nend\nfn tc_9 to bool\nr = is_multiply_prime 1001\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_76_is_simple_power", "language": "om", "prompt": "om2\nnote Your task is to write a function that returns true if a number x is a simple\nnote power of n and false in other cases.\nnote x is a simple power of n if n**int=x\nnote For example:\nnote >>> is_simple_power 1 4\nnote true\nnote >>> is_simple_power 2 2\nnote true\nnote >>> is_simple_power 8 2\nnote true\nnote >>> is_simple_power 3 2\nnote false\nnote >>> is_simple_power 3 1\nnote false\nnote >>> is_simple_power 5 3\nnote false\nfn is_simple_power x long n long to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_76_is_simple_power.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_simple_power 16 2\nret eq r true\nend\nfn tc_1 to bool\nr = is_simple_power 143214 16\nret eq r false\nend\nfn tc_2 to bool\nr = is_simple_power 4 2\nret eq r true\nend\nfn tc_3 to bool\nr = is_simple_power 9 3\nret eq r true\nend\nfn tc_4 to bool\nr = is_simple_power 16 4\nret eq r true\nend\nfn tc_5 to bool\nr = is_simple_power 24 2\nret eq r false\nend\nfn tc_6 to bool\nr = is_simple_power 128 4\nret eq r false\nend\nfn tc_7 to bool\nr = is_simple_power 12 6\nret eq r false\nend\nfn tc_8 to bool\nr = is_simple_power 1 1\nret eq r true\nend\nfn tc_9 to bool\nr = is_simple_power 1 12\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_77_iscube", "language": "om", "prompt": "om2\nnote Write a function that takes an integer a and returns true\nnote if this ingeger is a cube of some integer number.\nnote Note: you may assume the input is always valid.\nnote Examples:\nnote >>> iscube 1\nnote true\nnote >>> iscube 2\nnote false\nnote >>> iscube -1\nnote true\nnote >>> iscube 64\nnote true\nnote >>> iscube 0\nnote true\nnote >>> iscube 180\nnote false\nfn iscube a long to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_77_iscube.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = iscube 1\nret eq r true\nend\nfn tc_1 to bool\nr = iscube 2\nret eq r false\nend\nfn tc_2 to bool\nr = iscube -1\nret eq r true\nend\nfn tc_3 to bool\nr = iscube 64\nret eq r true\nend\nfn tc_4 to bool\nr = iscube 180\nret eq r false\nend\nfn tc_5 to bool\nr = iscube 1000\nret eq r true\nend\nfn tc_6 to bool\nr = iscube 0\nret eq r true\nend\nfn tc_7 to bool\nr = iscube 1729\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_78_hex_key", "language": "om", "prompt": "om2\nnote You have been tasked to write a function that receives\nnote a hexadecimal number as a string and counts the number of hexadecimal\nnote digits that are primes (prime number, or a prime, is a natural number\nnote greater than 1 that is not a product of two smaller natural numbers).\nnote Hexadecimal digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.\nnote Prime numbers are 2, 3, 5, 7, 11, 13, 17,...\nnote So you have to determine a number of the following digits: 2, 3, 5, 7,\nnote B (=decimal 11), D (=decimal 13).\nnote Note: you may assume the input is always correct or empty string,\nnote and symbols A,B,C,D,E,F are always uppercase.\nnote Examples:\nnote >>> hex_key \"AB\"\nnote 1\nnote >>> hex_key \"1077E\"\nnote 2\nnote >>> hex_key \"ABED1A33\"\nnote 4\nnote >>> hex_key \"123456789ABCDEF0\"\nnote 6\nnote >>> hex_key \"2020\"\nnote 2\nfn hex_key num view uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_78_hex_key.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"AB\"\nfn tc_0 to bool\nr = hex_key t0_0\nret eq r 1\nend\ntext t1_0 \"1077E\"\nfn tc_1 to bool\nr = hex_key t1_0\nret eq r 2\nend\ntext t2_0 \"ABED1A33\"\nfn tc_2 to bool\nr = hex_key t2_0\nret eq r 4\nend\ntext t3_0 \"2020\"\nfn tc_3 to bool\nr = hex_key t3_0\nret eq r 2\nend\ntext t4_0 \"123456789ABCDEF0\"\nfn tc_4 to bool\nr = hex_key t4_0\nret eq r 6\nend\ntext t5_0 \"112233445566778899AABBCCDDEEFF00\"\nfn tc_5 to bool\nr = hex_key t5_0\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_79_decimal_to_binary", "language": "om", "prompt": "om2\nnote You will be given a number in decimal form and your task is to convert it to\nnote binary format. The function should return a string, with each character representing a binary\nnote number. Each character in the string will be '0' or '1'.\nnote There will be an extra couple of characters 'db' at the beginning and at the end of the string.\nnote The extra characters are there to help with the format.\nnote Examples:\nnote >>> decimal_to_binary 15\nnote \"db1111db\"\nnote >>> decimal_to_binary 32\nnote \"db100000db\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn decimal_to_binary decimal long res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_79_decimal_to_binary.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new uchar 4096 0\nr = decimal_to_binary 0 res\nif ne r 5\nret false\nend\nif ne get res 0 100\nret false\nend\nif ne get res 1 98\nret false\nend\nif ne get res 2 48\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 98\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new uchar 4096 0\nr = decimal_to_binary 32 res\nif ne r 10\nret false\nend\nif ne get res 0 100\nret false\nend\nif ne get res 1 98\nret false\nend\nif ne get res 2 49\nret false\nend\nif ne get res 3 48\nret false\nend\nif ne get res 4 48\nret false\nend\nif ne get res 5 48\nret false\nend\nif ne get res 6 48\nret false\nend\nif ne get res 7 48\nret false\nend\nif ne get res 8 100\nret false\nend\nif ne get res 9 98\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new uchar 4096 0\nr = decimal_to_binary 103 res\nif ne r 11\nret false\nend\nif ne get res 0 100\nret false\nend\nif ne get res 1 98\nret false\nend\nif ne get res 2 49\nret false\nend\nif ne get res 3 49\nret false\nend\nif ne get res 4 48\nret false\nend\nif ne get res 5 48\nret false\nend\nif ne get res 6 49\nret false\nend\nif ne get res 7 49\nret false\nend\nif ne get res 8 49\nret false\nend\nif ne get res 9 100\nret false\nend\nif ne get res 10 98\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new uchar 4096 0\nr = decimal_to_binary 15 res\nif ne r 8\nret false\nend\nif ne get res 0 100\nret false\nend\nif ne get res 1 98\nret false\nend\nif ne get res 2 49\nret false\nend\nif ne get res 3 49\nret false\nend\nif ne get res 4 49\nret false\nend\nif ne get res 5 49\nret false\nend\nif ne get res 6 100\nret false\nend\nif ne get res 7 98\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_80_is_happy", "language": "om", "prompt": "om2\nnote You are given a string s.\nnote Your task is to check if the string is happy or not.\nnote A string is happy if its length is at least 3 and every 3 consecutive letters are distinct\nnote For example:\nnote >>> is_happy \"a\"\nnote false\nnote >>> is_happy \"aa\"\nnote false\nnote >>> is_happy \"abcd\"\nnote true\nnote >>> is_happy \"aabb\"\nnote false\nnote >>> is_happy \"adb\"\nnote true\nnote >>> is_happy \"xyy\"\nnote false\nfn is_happy s view uchar * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_80_is_happy.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"a\"\nfn tc_0 to bool\nr = is_happy t0_0\nret eq r false\nend\ntext t1_0 \"aa\"\nfn tc_1 to bool\nr = is_happy t1_0\nret eq r false\nend\ntext t2_0 \"abcd\"\nfn tc_2 to bool\nr = is_happy t2_0\nret eq r true\nend\ntext t3_0 \"aabb\"\nfn tc_3 to bool\nr = is_happy t3_0\nret eq r false\nend\ntext t4_0 \"adb\"\nfn tc_4 to bool\nr = is_happy t4_0\nret eq r true\nend\ntext t5_0 \"xyy\"\nfn tc_5 to bool\nr = is_happy t5_0\nret eq r false\nend\ntext t6_0 \"iopaxpoi\"\nfn tc_6 to bool\nr = is_happy t6_0\nret eq r true\nend\ntext t7_0 \"iopaxioi\"\nfn tc_7 to bool\nr = is_happy t7_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_82_prime_length", "language": "om", "prompt": "om2\nnote Write a function that takes a string and returns true if the string\nnote length is a prime number or false otherwise\nnote Examples\nnote >>> prime_length \"Hello\"\nnote true\nnote >>> prime_length \"abcdcba\"\nnote true\nnote >>> prime_length \"kittens\"\nnote true\nnote >>> prime_length \"orange\"\nnote false\nfn prime_length string view uchar * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_82_prime_length.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"Hello\"\nfn tc_0 to bool\nr = prime_length t0_0\nret eq r true\nend\ntext t1_0 \"abcdcba\"\nfn tc_1 to bool\nr = prime_length t1_0\nret eq r true\nend\ntext t2_0 \"kittens\"\nfn tc_2 to bool\nr = prime_length t2_0\nret eq r true\nend\ntext t3_0 \"orange\"\nfn tc_3 to bool\nr = prime_length t3_0\nret eq r false\nend\ntext t4_0 \"wow\"\nfn tc_4 to bool\nr = prime_length t4_0\nret eq r true\nend\ntext t5_0 \"world\"\nfn tc_5 to bool\nr = prime_length t5_0\nret eq r true\nend\ntext t6_0 \"MadaM\"\nfn tc_6 to bool\nr = prime_length t6_0\nret eq r true\nend\ntext t7_0 \"Wow\"\nfn tc_7 to bool\nr = prime_length t7_0\nret eq r true\nend\nfn tc_8 to bool\na0 = new uchar 1 0\nr = prime_length part a0 0 0\nret eq r false\nend\ntext t9_0 \"HI\"\nfn tc_9 to bool\nr = prime_length t9_0\nret eq r true\nend\ntext t10_0 \"go\"\nfn tc_10 to bool\nr = prime_length t10_0\nret eq r true\nend\ntext t11_0 \"gogo\"\nfn tc_11 to bool\nr = prime_length t11_0\nret eq r false\nend\ntext t12_0 \"aaaaaaaaaaaaaaa\"\nfn tc_12 to bool\nr = prime_length t12_0\nret eq r false\nend\ntext t13_0 \"Madam\"\nfn tc_13 to bool\nr = prime_length t13_0\nret eq r true\nend\ntext t14_0 \"M\"\nfn tc_14 to bool\nr = prime_length t14_0\nret eq r false\nend\ntext t15_0 \"0\"\nfn tc_15 to bool\nr = prime_length t15_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nif not tc_12\nret 13\nend\nif not tc_13\nret 14\nend\nif not tc_14\nret 15\nend\nif not tc_15\nret 16\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_83_starts_one_ends", "language": "om", "prompt": "om2\nnote Given a positive integer n, return the count of the numbers of n-digit\nnote positive integers that start or end with 1.\nfn starts_one_ends n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_83_starts_one_ends.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = starts_one_ends 1\nret eq r 1\nend\nfn tc_1 to bool\nr = starts_one_ends 2\nret eq r 18\nend\nfn tc_2 to bool\nr = starts_one_ends 3\nret eq r 180\nend\nfn tc_3 to bool\nr = starts_one_ends 4\nret eq r 1800\nend\nfn tc_4 to bool\nr = starts_one_ends 5\nret eq r 18000\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_84_solve", "language": "om", "prompt": "om2\nnote Given a positive integer N, return the total sum of its digits in binary.\nnote Example\nnote >>> solve 1000\nnote \"1\"\nnote >>> solve 150\nnote \"110\"\nnote >>> solve 147\nnote \"1100\"\nnote Variables:\nnote @N integer\nnote Constraints: 0 \u2264 N \u2264 10000.\nnote Output:\nnote a string of binary number\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn solve N long res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_84_solve.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new uchar 4096 0\nr = solve 1000 res\nif ne r 1\nret false\nend\nif ne get res 0 49\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new uchar 4096 0\nr = solve 150 res\nif ne r 3\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 49\nret false\nend\nif ne get res 2 48\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new uchar 4096 0\nr = solve 147 res\nif ne r 4\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 49\nret false\nend\nif ne get res 2 48\nret false\nend\nif ne get res 3 48\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new uchar 4096 0\nr = solve 333 res\nif ne r 4\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 48\nret false\nend\nif ne get res 2 48\nret false\nend\nif ne get res 3 49\nret false\nend\nret true\nend\nfn tc_4 to bool\nres = new uchar 4096 0\nr = solve 963 res\nif ne r 5\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 48\nret false\nend\nif ne get res 2 48\nret false\nend\nif ne get res 3 49\nret false\nend\nif ne get res 4 48\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_85_add", "language": "om", "prompt": "om2\nnote Given a non-empty array of integers lst. add the even elements that are at odd indices..\nnote Examples:\nnote >>> add_ [4, 2, 6, 7]\nnote 2\nnote Omega name: add is add_ here.\nfn add_ lst view long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_85_add.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 2 0\nput a0 0 4\nput a0 1 88\nr = add_ a0\nret eq r 88\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 4\nput a0 1 5\nput a0 2 6\nput a0 3 7\nput a0 4 2\nput a0 5 122\nr = add_ a0\nret eq r 122\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 0\nput a0 2 6\nput a0 3 7\nr = add_ a0\nret eq r 0\nend\nfn tc_3 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 4\nput a0 2 6\nput a0 3 8\nr = add_ a0\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_86_anti_shuffle", "language": "om", "prompt": "om2\nnote Write a function that takes a string and returns an ordered version of it.\nnote Ordered version of string, is a string where all words (separated by space)\nnote are replaced by a new word where all the characters arranged in\nnote ascending order based on ascii value.\nnote Note: You should keep the order of words and blank spaces in the sentence.\nnote For example:\nnote >>> anti_shuffle \"Hi\"\nnote \"Hi\"\nnote >>> anti_shuffle \"hello\"\nnote \"ehllo\"\nnote >>> anti_shuffle \"Hello World!!!\"\nnote \"Hello !!!Wdlor\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn anti_shuffle s view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_86_anti_shuffle.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"Hi\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = anti_shuffle t0_0 res\nif ne r 2\nret false\nend\nif ne get res 0 72\nret false\nend\nif ne get res 1 105\nret false\nend\nret true\nend\ntext t1_0 \"hello\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = anti_shuffle t1_0 res\nif ne r 5\nret false\nend\nif ne get res 0 101\nret false\nend\nif ne get res 1 104\nret false\nend\nif ne get res 2 108\nret false\nend\nif ne get res 3 108\nret false\nend\nif ne get res 4 111\nret false\nend\nret true\nend\ntext t2_0 \"number\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = anti_shuffle t2_0 res\nif ne r 6\nret false\nend\nif ne get res 0 98\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 109\nret false\nend\nif ne get res 3 110\nret false\nend\nif ne get res 4 114\nret false\nend\nif ne get res 5 117\nret false\nend\nret true\nend\ntext t3_0 \"abcd\"\nfn tc_3 to bool\nres = new uchar 4096 0\nr = anti_shuffle t3_0 res\nif ne r 4\nret false\nend\nif ne get res 0 97\nret false\nend\nif ne get res 1 98\nret false\nend\nif ne get res 2 99\nret false\nend\nif ne get res 3 100\nret false\nend\nret true\nend\ntext t4_0 \"Hello World!!!\"\nfn tc_4 to bool\nres = new uchar 4096 0\nr = anti_shuffle t4_0 res\nif ne r 14\nret false\nend\nif ne get res 0 72\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 108\nret false\nend\nif ne get res 3 108\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 33\nret false\nend\nif ne get res 7 33\nret false\nend\nif ne get res 8 33\nret false\nend\nif ne get res 9 87\nret false\nend\nif ne get res 10 100\nret false\nend\nif ne get res 11 108\nret false\nend\nif ne get res 12 111\nret false\nend\nif ne get res 13 114\nret false\nend\nret true\nend\nfn tc_5 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = anti_shuffle part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t6_0 \"Hi. My name is Mister Robot. How are you?\"\nfn tc_6 to bool\nres = new uchar 4096 0\nr = anti_shuffle t6_0 res\nif ne r 41\nret false\nend\nif ne get res 0 46\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 105\nret false\nend\nif ne get res 3 32\nret false\nend\nif ne get res 4 77\nret false\nend\nif ne get res 5 121\nret false\nend\nif ne get res 6 32\nret false\nend\nif ne get res 7 97\nret false\nend\nif ne get res 8 101\nret false\nend\nif ne get res 9 109\nret false\nend\nif ne get res 10 110\nret false\nend\nif ne get res 11 32\nret false\nend\nif ne get res 12 105\nret false\nend\nif ne get res 13 115\nret false\nend\nif ne get res 14 32\nret false\nend\nif ne get res 15 77\nret false\nend\nif ne get res 16 101\nret false\nend\nif ne get res 17 105\nret false\nend\nif ne get res 18 114\nret false\nend\nif ne get res 19 115\nret false\nend\nif ne get res 20 116\nret false\nend\nif ne get res 21 32\nret false\nend\nif ne get res 22 46\nret false\nend\nif ne get res 23 82\nret false\nend\nif ne get res 24 98\nret false\nend\nif ne get res 25 111\nret false\nend\nif ne get res 26 111\nret false\nend\nif ne get res 27 116\nret false\nend\nif ne get res 28 32\nret false\nend\nif ne get res 29 72\nret false\nend\nif ne get res 30 111\nret false\nend\nif ne get res 31 119\nret false\nend\nif ne get res 32 32\nret false\nend\nif ne get res 33 97\nret false\nend\nif ne get res 34 101\nret false\nend\nif ne get res 35 114\nret false\nend\nif ne get res 36 32\nret false\nend\nif ne get res 37 63\nret false\nend\nif ne get res 38 111\nret false\nend\nif ne get res 39 117\nret false\nend\nif ne get res 40 121\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_88_sort_array", "language": "om", "prompt": "om2\nnote Given an array of non-negative integers, return a copy of the given array after sorting,\nnote you will sort the given array in ascending order if the sum( first index value, last index value) is odd,\nnote or sort it in descending order if the sum( first index value, last index value) is even.\nnote Note:\nnote * don't change the given array.\nnote Examples:\nnote >>> sort_array []\nnote []\nnote >>> sort_array [5]\nnote [5]\nnote >>> sort_array [2, 4, 3, 0, 1, 5]\nnote [0, 1, 2, 3, 4, 5]\nnote >>> sort_array [2, 4, 3, 0, 1, 5, 6]\nnote [6, 5, 4, 3, 2, 1, 0]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn sort_array array view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_88_sort_array.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = sort_array part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 1 0\nput a0 0 5\nres = new long 4096 0\nr = sort_array a0 res\nif ne r 1\nret false\nend\nif ne get res 0 5\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 6 0\nput a0 0 2\nput a0 1 4\nput a0 2 3\nput a0 3 0\nput a0 4 1\nput a0 5 5\nres = new long 4096 0\nr = sort_array a0 res\nif ne r 6\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 1\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 4\nret false\nend\nif ne get res 5 5\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 7 0\nput a0 0 2\nput a0 1 4\nput a0 2 3\nput a0 3 0\nput a0 4 1\nput a0 5 5\nput a0 6 6\nres = new long 4096 0\nr = sort_array a0 res\nif ne r 7\nret false\nend\nif ne get res 0 6\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 2\nret false\nend\nif ne get res 5 1\nret false\nend\nif ne get res 6 0\nret false\nend\nret true\nend\nfn tc_4 to bool\na0 = new long 2 0\nput a0 0 2\nput a0 1 1\nres = new long 4096 0\nr = sort_array a0 res\nif ne r 2\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nret true\nend\nfn tc_5 to bool\na0 = new long 6 0\nput a0 0 15\nput a0 1 42\nput a0 2 87\nput a0 3 32\nput a0 4 11\nput a0 5 0\nres = new long 4096 0\nr = sort_array a0 res\nif ne r 6\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 11\nret false\nend\nif ne get res 2 15\nret false\nend\nif ne get res 3 32\nret false\nend\nif ne get res 4 42\nret false\nend\nif ne get res 5 87\nret false\nend\nret true\nend\nfn tc_6 to bool\na0 = new long 4 0\nput a0 0 21\nput a0 1 14\nput a0 2 23\nput a0 3 11\nres = new long 4096 0\nr = sort_array a0 res\nif ne r 4\nret false\nend\nif ne get res 0 23\nret false\nend\nif ne get res 1 21\nret false\nend\nif ne get res 2 14\nret false\nend\nif ne get res 3 11\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_89_encrypt", "language": "om", "prompt": "om2\nnote Create a function encrypt that takes a string as an argument and\nnote returns a string encrypted with the alphabet being rotated.\nnote The alphabet should be rotated in a manner such that the letters\nnote shift down by two multiplied to two places.\nnote For example:\nnote >>> encrypt \"hi\"\nnote \"lm\"\nnote >>> encrypt \"asdfghjkl\"\nnote \"ewhjklnop\"\nnote >>> encrypt \"gf\"\nnote \"kj\"\nnote >>> encrypt \"et\"\nnote \"ix\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn encrypt s view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_89_encrypt.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"hi\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = encrypt t0_0 res\nif ne r 2\nret false\nend\nif ne get res 0 108\nret false\nend\nif ne get res 1 109\nret false\nend\nret true\nend\ntext t1_0 \"asdfghjkl\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = encrypt t1_0 res\nif ne r 9\nret false\nend\nif ne get res 0 101\nret false\nend\nif ne get res 1 119\nret false\nend\nif ne get res 2 104\nret false\nend\nif ne get res 3 106\nret false\nend\nif ne get res 4 107\nret false\nend\nif ne get res 5 108\nret false\nend\nif ne get res 6 110\nret false\nend\nif ne get res 7 111\nret false\nend\nif ne get res 8 112\nret false\nend\nret true\nend\ntext t2_0 \"gf\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = encrypt t2_0 res\nif ne r 2\nret false\nend\nif ne get res 0 107\nret false\nend\nif ne get res 1 106\nret false\nend\nret true\nend\ntext t3_0 \"et\"\nfn tc_3 to bool\nres = new uchar 4096 0\nr = encrypt t3_0 res\nif ne r 2\nret false\nend\nif ne get res 0 105\nret false\nend\nif ne get res 1 120\nret false\nend\nret true\nend\ntext t4_0 \"faewfawefaewg\"\nfn tc_4 to bool\nres = new uchar 4096 0\nr = encrypt t4_0 res\nif ne r 13\nret false\nend\nif ne get res 0 106\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 105\nret false\nend\nif ne get res 3 97\nret false\nend\nif ne get res 4 106\nret false\nend\nif ne get res 5 101\nret false\nend\nif ne get res 6 97\nret false\nend\nif ne get res 7 105\nret false\nend\nif ne get res 8 106\nret false\nend\nif ne get res 9 101\nret false\nend\nif ne get res 10 105\nret false\nend\nif ne get res 11 97\nret false\nend\nif ne get res 12 107\nret false\nend\nret true\nend\ntext t5_0 \"hellomyfriend\"\nfn tc_5 to bool\nres = new uchar 4096 0\nr = encrypt t5_0 res\nif ne r 13\nret false\nend\nif ne get res 0 108\nret false\nend\nif ne get res 1 105\nret false\nend\nif ne get res 2 112\nret false\nend\nif ne get res 3 112\nret false\nend\nif ne get res 4 115\nret false\nend\nif ne get res 5 113\nret false\nend\nif ne get res 6 99\nret false\nend\nif ne get res 7 106\nret false\nend\nif ne get res 8 118\nret false\nend\nif ne get res 9 109\nret false\nend\nif ne get res 10 105\nret false\nend\nif ne get res 11 114\nret false\nend\nif ne get res 12 104\nret false\nend\nret true\nend\ntext t6_0 \"dxzdlmnilfuhmilufhlihufnmlimnufhlimnufhfucufh\"\nfn tc_6 to bool\nres = new uchar 4096 0\nr = encrypt t6_0 res\nif ne r 45\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 98\nret false\nend\nif ne get res 2 100\nret false\nend\nif ne get res 3 104\nret false\nend\nif ne get res 4 112\nret false\nend\nif ne get res 5 113\nret false\nend\nif ne get res 6 114\nret false\nend\nif ne get res 7 109\nret false\nend\nif ne get res 8 112\nret false\nend\nif ne get res 9 106\nret false\nend\nif ne get res 10 121\nret false\nend\nif ne get res 11 108\nret false\nend\nif ne get res 12 113\nret false\nend\nif ne get res 13 109\nret false\nend\nif ne get res 14 112\nret false\nend\nif ne get res 15 121\nret false\nend\nif ne get res 16 106\nret false\nend\nif ne get res 17 108\nret false\nend\nif ne get res 18 112\nret false\nend\nif ne get res 19 109\nret false\nend\nif ne get res 20 108\nret false\nend\nif ne get res 21 121\nret false\nend\nif ne get res 22 106\nret false\nend\nif ne get res 23 114\nret false\nend\nif ne get res 24 113\nret false\nend\nif ne get res 25 112\nret false\nend\nif ne get res 26 109\nret false\nend\nif ne get res 27 113\nret false\nend\nif ne get res 28 114\nret false\nend\nif ne get res 29 121\nret false\nend\nif ne get res 30 106\nret false\nend\nif ne get res 31 108\nret false\nend\nif ne get res 32 112\nret false\nend\nif ne get res 33 109\nret false\nend\nif ne get res 34 113\nret false\nend\nif ne get res 35 114\nret false\nend\nif ne get res 36 121\nret false\nend\nif ne get res 37 106\nret false\nend\nif ne get res 38 108\nret false\nend\nif ne get res 39 106\nret false\nend\nif ne get res 40 121\nret false\nend\nif ne get res 41 103\nret false\nend\nif ne get res 42 121\nret false\nend\nif ne get res 43 106\nret false\nend\nif ne get res 44 108\nret false\nend\nret true\nend\ntext t7_0 \"a\"\nfn tc_7 to bool\nres = new uchar 4096 0\nr = encrypt t7_0 res\nif ne r 1\nret false\nend\nif ne get res 0 101\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_91_is_bored", "language": "om", "prompt": "om2\nnote You'll be given a string of words, and your task is to count the number\nnote of boredoms. A boredom is a sentence that starts with the word \"I\".\nnote Sentences are delimited by '.', '?' or '!'.\nnote For example:\nnote >>> is_bored \"Hello world\"\nnote 0\nnote >>> is_bored \"The sky is blue. The sun is shining. I love this weather\"\nnote 1\nfn is_bored S view uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_91_is_bored.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"Hello world\"\nfn tc_0 to bool\nr = is_bored t0_0\nret eq r 0\nend\ntext t1_0 \"Is the sky blue?\"\nfn tc_1 to bool\nr = is_bored t1_0\nret eq r 0\nend\ntext t2_0 \"I love It !\"\nfn tc_2 to bool\nr = is_bored t2_0\nret eq r 1\nend\ntext t3_0 \"bIt\"\nfn tc_3 to bool\nr = is_bored t3_0\nret eq r 0\nend\ntext t4_0 \"I feel good today. I will be productive. will kill It\"\nfn tc_4 to bool\nr = is_bored t4_0\nret eq r 2\nend\ntext t5_0 \"You and I are going for a walk\"\nfn tc_5 to bool\nr = is_bored t5_0\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_92_any_int", "language": "om", "prompt": "om2\nnote Create a function that takes 3 numbers.\nnote Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.\nnote Returns false in any other cases.\nnote Examples\nnote >>> any_int 5 2 7\nnote true\nnote >>> any_int 3 2 2\nnote false\nnote >>> any_int 3 -2 1\nnote true\nnote >>> any_int 3.6 -2.2 2\nnote false\nfn any_int x f64 y f64 z f64 to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_92_any_int.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = any_int 2.0 3.0 1.0\nret eq r true\nend\nfn tc_1 to bool\nr = any_int 2.5 2.0 3.0\nret eq r false\nend\nfn tc_2 to bool\nr = any_int 1.5 5.0 3.5\nret eq r false\nend\nfn tc_3 to bool\nr = any_int 2.0 6.0 2.0\nret eq r false\nend\nfn tc_4 to bool\nr = any_int 4.0 2.0 2.0\nret eq r true\nend\nfn tc_5 to bool\nr = any_int 2.2 2.2 2.2\nret eq r false\nend\nfn tc_6 to bool\nr = any_int -4.0 6.0 2.0\nret eq r true\nend\nfn tc_7 to bool\nr = any_int 2.0 1.0 1.0\nret eq r true\nend\nfn tc_8 to bool\nr = any_int 3.0 4.0 7.0\nret eq r true\nend\nfn tc_9 to bool\nr = any_int 3.0 4.0 7.0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_93_encode", "language": "om", "prompt": "om2\nnote Write a function that takes a message, and encodes in such a\nnote way that it swaps case of all letters, replaces all vowels in\nnote the message with the letter that appears 2 places ahead of that\nnote vowel in the english alphabet.\nnote Assume only letters.\nnote Examples:\nnote >>> encode \"test\"\nnote \"TGST\"\nnote >>> encode \"This is a message\"\nnote \"tHKS KS C MGSSCGG\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn encode message view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_93_encode.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"TEST\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = encode t0_0 res\nif ne r 4\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 103\nret false\nend\nif ne get res 2 115\nret false\nend\nif ne get res 3 116\nret false\nend\nret true\nend\ntext t1_0 \"Mudasir\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = encode t1_0 res\nif ne r 7\nret false\nend\nif ne get res 0 109\nret false\nend\nif ne get res 1 87\nret false\nend\nif ne get res 2 68\nret false\nend\nif ne get res 3 67\nret false\nend\nif ne get res 4 83\nret false\nend\nif ne get res 5 75\nret false\nend\nif ne get res 6 82\nret false\nend\nret true\nend\ntext t2_0 \"YES\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = encode t2_0 res\nif ne r 3\nret false\nend\nif ne get res 0 121\nret false\nend\nif ne get res 1 103\nret false\nend\nif ne get res 2 115\nret false\nend\nret true\nend\ntext t3_0 \"This is a message\"\nfn tc_3 to bool\nres = new uchar 4096 0\nr = encode t3_0 res\nif ne r 17\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 75\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 32\nret false\nend\nif ne get res 5 75\nret false\nend\nif ne get res 6 83\nret false\nend\nif ne get res 7 32\nret false\nend\nif ne get res 8 67\nret false\nend\nif ne get res 9 32\nret false\nend\nif ne get res 10 77\nret false\nend\nif ne get res 11 71\nret false\nend\nif ne get res 12 83\nret false\nend\nif ne get res 13 83\nret false\nend\nif ne get res 14 67\nret false\nend\nif ne get res 15 71\nret false\nend\nif ne get res 16 71\nret false\nend\nret true\nend\ntext t4_0 \"I DoNt KnOw WhAt tO WrItE\"\nfn tc_4 to bool\nres = new uchar 4096 0\nr = encode t4_0 res\nif ne r 25\nret false\nend\nif ne get res 0 107\nret false\nend\nif ne get res 1 32\nret false\nend\nif ne get res 2 100\nret false\nend\nif ne get res 3 81\nret false\nend\nif ne get res 4 110\nret false\nend\nif ne get res 5 84\nret false\nend\nif ne get res 6 32\nret false\nend\nif ne get res 7 107\nret false\nend\nif ne get res 8 78\nret false\nend\nif ne get res 9 113\nret false\nend\nif ne get res 10 87\nret false\nend\nif ne get res 11 32\nret false\nend\nif ne get res 12 119\nret false\nend\nif ne get res 13 72\nret false\nend\nif ne get res 14 99\nret false\nend\nif ne get res 15 84\nret false\nend\nif ne get res 16 32\nret false\nend\nif ne get res 17 84\nret false\nend\nif ne get res 18 113\nret false\nend\nif ne get res 19 32\nret false\nend\nif ne get res 20 119\nret false\nend\nif ne get res 21 82\nret false\nend\nif ne get res 22 107\nret false\nend\nif ne get res 23 84\nret false\nend\nif ne get res 24 103\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_94_skjkasdkd", "language": "om", "prompt": "om2\nnote You are given an array of integers.\nnote You need to find the largest prime value and return the sum of its digits.\nnote Examples:\nnote >>> skjkasdkd [0, 3, 2, 1, 3, 5, 7, 4, 5, 5, 5, 2, 181, 32, 4, 32, 3, 2, 32, 324, 4, 3]\nnote 10\nnote >>> skjkasdkd [1, 0, 1, 8, 2, 4597, 2, 1, 3, 40, 1, 2, 1, 2, 4, 2, 5, 1]\nnote 25\nnote >>> skjkasdkd [1, 3, 1, 32, 5107, 34, 83278, 109, 163, 23, 2323, 32, 30, 1, 9, 3]\nnote 13\nnote >>> skjkasdkd [0, 724, 32, 71, 99, 32, 6, 0, 5, 91, 83, 0, 5, 6]\nnote 11\nnote >>> skjkasdkd [0, 81, 12, 3, 1, 21]\nnote 3\nnote >>> skjkasdkd [0, 8, 1, 2, 1, 7]\nnote 7\nfn skjkasdkd lst view long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_94_skjkasdkd.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 22 0\nput a0 0 0\nput a0 1 3\nput a0 2 2\nput a0 3 1\nput a0 4 3\nput a0 5 5\nput a0 6 7\nput a0 7 4\nput a0 8 5\nput a0 9 5\nput a0 10 5\nput a0 11 2\nput a0 12 181\nput a0 13 32\nput a0 14 4\nput a0 15 32\nput a0 16 3\nput a0 17 2\nput a0 18 32\nput a0 19 324\nput a0 20 4\nput a0 21 3\nr = skjkasdkd a0\nret eq r 10\nend\nfn tc_1 to bool\na0 = new long 18 0\nput a0 0 1\nput a0 1 0\nput a0 2 1\nput a0 3 8\nput a0 4 2\nput a0 5 4597\nput a0 6 2\nput a0 7 1\nput a0 8 3\nput a0 9 40\nput a0 10 1\nput a0 11 2\nput a0 12 1\nput a0 13 2\nput a0 14 4\nput a0 15 2\nput a0 16 5\nput a0 17 1\nr = skjkasdkd a0\nret eq r 25\nend\nfn tc_2 to bool\na0 = new long 16 0\nput a0 0 1\nput a0 1 3\nput a0 2 1\nput a0 3 32\nput a0 4 5107\nput a0 5 34\nput a0 6 83278\nput a0 7 109\nput a0 8 163\nput a0 9 23\nput a0 10 2323\nput a0 11 32\nput a0 12 30\nput a0 13 1\nput a0 14 9\nput a0 15 3\nr = skjkasdkd a0\nret eq r 13\nend\nfn tc_3 to bool\na0 = new long 14 0\nput a0 0 0\nput a0 1 724\nput a0 2 32\nput a0 3 71\nput a0 4 99\nput a0 5 32\nput a0 6 6\nput a0 7 0\nput a0 8 5\nput a0 9 91\nput a0 10 83\nput a0 11 0\nput a0 12 5\nput a0 13 6\nr = skjkasdkd a0\nret eq r 11\nend\nfn tc_4 to bool\na0 = new long 6 0\nput a0 0 0\nput a0 1 81\nput a0 2 12\nput a0 3 3\nput a0 4 1\nput a0 5 21\nr = skjkasdkd a0\nret eq r 3\nend\nfn tc_5 to bool\na0 = new long 6 0\nput a0 0 0\nput a0 1 8\nput a0 2 1\nput a0 3 2\nput a0 4 1\nput a0 5 7\nr = skjkasdkd a0\nret eq r 7\nend\nfn tc_6 to bool\na0 = new long 1 0\nput a0 0 8191\nr = skjkasdkd a0\nret eq r 19\nend\nfn tc_7 to bool\na0 = new long 4 0\nput a0 0 8191\nput a0 1 123456\nput a0 2 127\nput a0 3 7\nr = skjkasdkd a0\nret eq r 19\nend\nfn tc_8 to bool\na0 = new long 3 0\nput a0 0 127\nput a0 1 97\nput a0 2 8192\nr = skjkasdkd a0\nret eq r 10\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_96_count_up_to", "language": "om", "prompt": "om2\nnote Implement a function that takes an non-negative integer and returns an array of the first n\nnote integers that are prime numbers and less than n.\nnote for example:\nnote >>> count_up_to 5\nnote [2, 3]\nnote >>> count_up_to 11\nnote [2, 3, 5, 7]\nnote >>> count_up_to 0\nnote []\nnote >>> count_up_to 20\nnote [2, 3, 5, 7, 11, 13, 17, 19]\nnote >>> count_up_to 1\nnote []\nnote >>> count_up_to 18\nnote [2, 3, 5, 7, 11, 13, 17]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn count_up_to n long res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_96_count_up_to.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = count_up_to 5 res\nif ne r 2\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = count_up_to 6 res\nif ne r 3\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 5\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = count_up_to 7 res\nif ne r 3\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 5\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new long 4096 0\nr = count_up_to 10 res\nif ne r 4\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 7\nret false\nend\nret true\nend\nfn tc_4 to bool\nres = new long 4096 0\nr = count_up_to 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_5 to bool\nres = new long 4096 0\nr = count_up_to 22 res\nif ne r 8\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 7\nret false\nend\nif ne get res 4 11\nret false\nend\nif ne get res 5 13\nret false\nend\nif ne get res 6 17\nret false\nend\nif ne get res 7 19\nret false\nend\nret true\nend\nfn tc_6 to bool\nres = new long 4096 0\nr = count_up_to 1 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_7 to bool\nres = new long 4096 0\nr = count_up_to 18 res\nif ne r 7\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 7\nret false\nend\nif ne get res 4 11\nret false\nend\nif ne get res 5 13\nret false\nend\nif ne get res 6 17\nret false\nend\nret true\nend\nfn tc_8 to bool\nres = new long 4096 0\nr = count_up_to 47 res\nif ne r 14\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 7\nret false\nend\nif ne get res 4 11\nret false\nend\nif ne get res 5 13\nret false\nend\nif ne get res 6 17\nret false\nend\nif ne get res 7 19\nret false\nend\nif ne get res 8 23\nret false\nend\nif ne get res 9 29\nret false\nend\nif ne get res 10 31\nret false\nend\nif ne get res 11 37\nret false\nend\nif ne get res 12 41\nret false\nend\nif ne get res 13 43\nret false\nend\nret true\nend\nfn tc_9 to bool\nres = new long 4096 0\nr = count_up_to 101 res\nif ne r 25\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 7\nret false\nend\nif ne get res 4 11\nret false\nend\nif ne get res 5 13\nret false\nend\nif ne get res 6 17\nret false\nend\nif ne get res 7 19\nret false\nend\nif ne get res 8 23\nret false\nend\nif ne get res 9 29\nret false\nend\nif ne get res 10 31\nret false\nend\nif ne get res 11 37\nret false\nend\nif ne get res 12 41\nret false\nend\nif ne get res 13 43\nret false\nend\nif ne get res 14 47\nret false\nend\nif ne get res 15 53\nret false\nend\nif ne get res 16 59\nret false\nend\nif ne get res 17 61\nret false\nend\nif ne get res 18 67\nret false\nend\nif ne get res 19 71\nret false\nend\nif ne get res 20 73\nret false\nend\nif ne get res 21 79\nret false\nend\nif ne get res 22 83\nret false\nend\nif ne get res 23 89\nret false\nend\nif ne get res 24 97\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_97_multiply", "language": "om", "prompt": "om2\nnote Complete the function that takes two integers and returns\nnote the product of their unit digits.\nnote Assume the input is always valid.\nnote Examples:\nnote >>> multiply 148 412\nnote 16\nnote >>> multiply 19 28\nnote 72\nnote >>> multiply 2020 1851\nnote 0\nnote >>> multiply 14 -15\nnote 20\nfn multiply a long b long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_97_multiply.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = multiply 148 412\nret eq r 16\nend\nfn tc_1 to bool\nr = multiply 19 28\nret eq r 72\nend\nfn tc_2 to bool\nr = multiply 2020 1851\nret eq r 0\nend\nfn tc_3 to bool\nr = multiply 14 -15\nret eq r 20\nend\nfn tc_4 to bool\nr = multiply 76 67\nret eq r 42\nend\nfn tc_5 to bool\nr = multiply 17 27\nret eq r 49\nend\nfn tc_6 to bool\nr = multiply 0 1\nret eq r 0\nend\nfn tc_7 to bool\nr = multiply 0 0\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_98_count_upper", "language": "om", "prompt": "om2\nnote Given a string s, count the number of uppercase vowels in even indices.\nnote For example:\nnote >>> count_upper \"aBCdEf\"\nnote 1\nnote >>> count_upper \"abcdefg\"\nnote 0\nnote >>> count_upper \"dBBE\"\nnote 0\nfn count_upper s view uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_98_count_upper.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"aBCdEf\"\nfn tc_0 to bool\nr = count_upper t0_0\nret eq r 1\nend\ntext t1_0 \"abcdefg\"\nfn tc_1 to bool\nr = count_upper t1_0\nret eq r 0\nend\ntext t2_0 \"dBBE\"\nfn tc_2 to bool\nr = count_upper t2_0\nret eq r 0\nend\ntext t3_0 \"B\"\nfn tc_3 to bool\nr = count_upper t3_0\nret eq r 0\nend\ntext t4_0 \"U\"\nfn tc_4 to bool\nr = count_upper t4_0\nret eq r 1\nend\nfn tc_5 to bool\na0 = new uchar 1 0\nr = count_upper part a0 0 0\nret eq r 0\nend\ntext t6_0 \"EEEE\"\nfn tc_6 to bool\nr = count_upper t6_0\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_99_closest_integer", "language": "om", "prompt": "om2\nnote Create a function that takes a value (string) representing a number\nnote and returns the closest integer to it. If the number is equidistant\nnote from two integers, round it away from zero.\nnote Examples\nnote >>> closest_integer \"10\"\nnote 10\nnote >>> closest_integer \"15.3\"\nnote 15\nnote Note:\nnote Rounding away from zero means that if the given number is equidistant\nnote from two integers, the one you should return is the one that is the\nnote farthest from zero. For example closest_integer(\"14.5\") should\nnote return 15 and closest_integer(\"-14.5\") should return -15.\nfn closest_integer value view uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_99_closest_integer.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"10\"\nfn tc_0 to bool\nr = closest_integer t0_0\nret eq r 10\nend\ntext t1_0 \"14.5\"\nfn tc_1 to bool\nr = closest_integer t1_0\nret eq r 15\nend\ntext t2_0 \"-15.5\"\nfn tc_2 to bool\nr = closest_integer t2_0\nret eq r -16\nend\ntext t3_0 \"15.3\"\nfn tc_3 to bool\nr = closest_integer t3_0\nret eq r 15\nend\ntext t4_0 \"0\"\nfn tc_4 to bool\nr = closest_integer t4_0\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_100_make_a_pile", "language": "om", "prompt": "om2\nnote Given a positive integer n, you have to make a pile of n levels of stones.\nnote The first level has n stones.\nnote The number of stones in the next level is:\nnote - the next odd number if n is odd.\nnote - the next even number if n is even.\nnote Return the number of stones in each level in an array, where element at index\nnote i represents the number of stones in the level (i+1).\nnote Examples:\nnote >>> make_a_pile 3\nnote [3, 5, 7]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn make_a_pile n long res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_100_make_a_pile.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = make_a_pile 3 res\nif ne r 3\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 7\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = make_a_pile 4 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 6\nret false\nend\nif ne get res 2 8\nret false\nend\nif ne get res 3 10\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = make_a_pile 5 res\nif ne r 5\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 7\nret false\nend\nif ne get res 2 9\nret false\nend\nif ne get res 3 11\nret false\nend\nif ne get res 4 13\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new long 4096 0\nr = make_a_pile 6 res\nif ne r 6\nret false\nend\nif ne get res 0 6\nret false\nend\nif ne get res 1 8\nret false\nend\nif ne get res 2 10\nret false\nend\nif ne get res 3 12\nret false\nend\nif ne get res 4 14\nret false\nend\nif ne get res 5 16\nret false\nend\nret true\nend\nfn tc_4 to bool\nres = new long 4096 0\nr = make_a_pile 8 res\nif ne r 8\nret false\nend\nif ne get res 0 8\nret false\nend\nif ne get res 1 10\nret false\nend\nif ne get res 2 12\nret false\nend\nif ne get res 3 14\nret false\nend\nif ne get res 4 16\nret false\nend\nif ne get res 5 18\nret false\nend\nif ne get res 6 20\nret false\nend\nif ne get res 7 22\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_102_choose_num", "language": "om", "prompt": "om2\nnote This function takes two positive numbers x and y and returns the\nnote biggest even integer number that is in the range [x, y] inclusive. If\nnote there's no such number, then the function should return -1.\nnote For example:\nnote >>> choose_num 12 15\nnote 14\nnote >>> choose_num 13 12\nnote -1\nfn choose_num x long y long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_102_choose_num.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = choose_num 12 15\nret eq r 14\nend\nfn tc_1 to bool\nr = choose_num 13 12\nret eq r -1\nend\nfn tc_2 to bool\nr = choose_num 33 12354\nret eq r 12354\nend\nfn tc_3 to bool\nr = choose_num 5234 5233\nret eq r -1\nend\nfn tc_4 to bool\nr = choose_num 6 29\nret eq r 28\nend\nfn tc_5 to bool\nr = choose_num 27 10\nret eq r -1\nend\nfn tc_6 to bool\nr = choose_num 7 7\nret eq r -1\nend\nfn tc_7 to bool\nr = choose_num 546 546\nret eq r 546\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_104_unique_digits", "language": "om", "prompt": "om2\nnote Given an array of positive integers x. return a sorted array of all\nnote elements that hasn't any even digit.\nnote Note: Returned array should be sorted in increasing order.\nnote For example:\nnote >>> unique_digits [15, 33, 1422, 1]\nnote [1, 15, 33]\nnote >>> unique_digits [152, 323, 1422, 10]\nnote []\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn unique_digits x view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_104_unique_digits.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 15\nput a0 1 33\nput a0 2 1422\nput a0 3 1\nres = new long 4096 0\nr = unique_digits a0 res\nif ne r 3\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 15\nret false\nend\nif ne get res 2 33\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 152\nput a0 1 323\nput a0 2 1422\nput a0 3 10\nres = new long 4096 0\nr = unique_digits a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 12345\nput a0 1 2033\nput a0 2 111\nput a0 3 151\nres = new long 4096 0\nr = unique_digits a0 res\nif ne r 2\nret false\nend\nif ne get res 0 111\nret false\nend\nif ne get res 1 151\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 3 0\nput a0 0 135\nput a0 1 103\nput a0 2 31\nres = new long 4096 0\nr = unique_digits a0 res\nif ne r 2\nret false\nend\nif ne get res 0 31\nret false\nend\nif ne get res 1 135\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_106_f", "language": "om", "prompt": "om2\nnote Implement the function f that takes n as a parameter,\nnote and returns an array of size n, such that the value of the element at index i is the factorial of i if i is even\nnote or the sum of numbers from 1 to i otherwise.\nnote i starts from 1.\nnote the factorial of i is the multiplication of the numbers from 1 to i (1 * 2 * ... * i).\nnote Example:\nnote >>> f 5\nnote [1, 2, 6, 24, 15]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn f n long res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_106_f.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = f 5 res\nif ne r 5\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 24\nret false\nend\nif ne get res 4 15\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = f 7 res\nif ne r 7\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 24\nret false\nend\nif ne get res 4 15\nret false\nend\nif ne get res 5 720\nret false\nend\nif ne get res 6 28\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = f 1 res\nif ne r 1\nret false\nend\nif ne get res 0 1\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new long 4096 0\nr = f 3 res\nif ne r 3\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_107_even_odd_palindrome", "language": "om", "prompt": "om2\nnote Given a positive integer n, return an array that has the number of even and odd\nnote integer palindromes that fall within the range(1, n), inclusive.\nnote Example 1:\nnote >>> even_odd_palindrome 3\nnote (1, 2)\nnote Explanation:\nnote Integer palindrome are 1, 2, 3. one of them is even, and two of them are odd.\nnote Example 2:\nnote >>> even_odd_palindrome 12\nnote (4, 6)\nnote Explanation:\nnote Integer palindrome are 1, 2, 3, 4, 5, 6, 7, 8, 9, 11. four of them are even, and 6 of them are odd.\nnote Note:\nnote 1. 1 <= n <= 10^3\nnote 2. returned array has the number of even and odd integer palindromes respectively.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn even_odd_palindrome n long res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_107_even_odd_palindrome.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = even_odd_palindrome 123 res\nif ne r 2\nret false\nend\nif ne get res 0 8\nret false\nend\nif ne get res 1 13\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = even_odd_palindrome 12 res\nif ne r 2\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 6\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = even_odd_palindrome 3 res\nif ne r 2\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new long 4096 0\nr = even_odd_palindrome 63 res\nif ne r 2\nret false\nend\nif ne get res 0 6\nret false\nend\nif ne get res 1 8\nret false\nend\nret true\nend\nfn tc_4 to bool\nres = new long 4096 0\nr = even_odd_palindrome 25 res\nif ne r 2\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 6\nret false\nend\nret true\nend\nfn tc_5 to bool\nres = new long 4096 0\nr = even_odd_palindrome 19 res\nif ne r 2\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 6\nret false\nend\nret true\nend\nfn tc_6 to bool\nres = new long 4096 0\nr = even_odd_palindrome 9 res\nif ne r 2\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nret true\nend\nfn tc_7 to bool\nres = new long 4096 0\nr = even_odd_palindrome 1 res\nif ne r 2\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 1\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_108_count_nums", "language": "om", "prompt": "om2\nnote Write a function count_nums which takes an array of integers and returns\nnote the number of elements which has a sum of digits > 0.\nnote If a number is negative, then its first signed digit will be negative:\nnote e.g. -123 has signed digits -1, 2, and 3.\nnote >>> count_nums []\nnote 0\nnote >>> count_nums [-1, 11, -11]\nnote 1\nnote >>> count_nums [1, 1, 2]\nnote 3\nfn count_nums arr view long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_108_count_nums.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 1 0\nr = count_nums part a0 0 0\nret eq r 0\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 0\nr = count_nums a0\nret eq r 0\nend\nfn tc_2 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 1\nput a0 2 2\nput a0 3 -2\nput a0 4 3\nput a0 5 4\nput a0 6 5\nr = count_nums a0\nret eq r 6\nend\nfn tc_3 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 6\nput a0 2 9\nput a0 3 -6\nput a0 4 0\nput a0 5 1\nput a0 6 5\nr = count_nums a0\nret eq r 5\nend\nfn tc_4 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 100\nput a0 2 98\nput a0 3 -7\nput a0 4 1\nput a0 5 -1\nr = count_nums a0\nret eq r 4\nend\nfn tc_5 to bool\na0 = new long 6 0\nput a0 0 12\nput a0 1 23\nput a0 2 34\nput a0 3 -45\nput a0 4 -56\nput a0 5 0\nr = count_nums a0\nret eq r 5\nend\nfn tc_6 to bool\na0 = new long 2 0\nput a0 0 0\nput a0 1 1\nr = count_nums a0\nret eq r 1\nend\nfn tc_7 to bool\na0 = new long 1 0\nput a0 0 1\nr = count_nums a0\nret eq r 1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_109_move_one_ball", "language": "om", "prompt": "om2\nnote We have an array 'arr' of N integers arr[1], arr[2], ..., arr[N].The\nnote numbers in the array will be randomly ordered. Your task is to determine if\nnote it is possible to get an array sorted in non-decreasing order by performing\nnote the following operation on the given array:\nnote You are allowed to perform right shift operation any number of times.\nnote One right shift operation means shifting all elements of the array by one\nnote position in the right direction. The last element of the array will be moved to\nnote the starting position in the array i.e. 0th index.\nnote If it is possible to obtain the sorted array by performing the above operation\nnote then return true else return false.\nnote If the given array is empty then return true.\nnote Note: The given array is guaranteed to have unique elements.\nnote For Example:\nnote >>> move_one_ball [3, 4, 5, 1, 2]\nnote true\nnote Explanation: By performin 2 right shift operations, non-decreasing order can\nnote be achieved for the given array.\nnote >>> move_one_ball [3, 5, 4, 1, 2]\nnote false\nnote Explanation:It is not possible to get non-decreasing order for the given\nnote array by performing any number of right shift operations.\nfn move_one_ball arr view long * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_109_move_one_ball.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 4\nput a0 2 5\nput a0 3 1\nput a0 4 2\nr = move_one_ball a0\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 5\nput a0 2 10\nput a0 3 1\nput a0 4 2\nr = move_one_ball a0\nret eq r true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 1\nput a0 3 2\nr = move_one_ball a0\nret eq r false\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 5\nput a0 2 4\nput a0 3 1\nput a0 4 2\nr = move_one_ball a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 1 0\nr = move_one_ball part a0 0 0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_110_exchange", "language": "om", "prompt": "om2\nnote In this problem, you will implement a function that takes two lists of numbers,\nnote and determines whether it is possible to perform an exchange of elements\nnote between them to make lst1 an array of only even numbers.\nnote There is no limit on the number of exchanged elements between lst1 and lst2.\nnote If it is possible to exchange elements between the lst1 and lst2 to make\nnote all the elements of lst1 to be even, return \"YES\".\nnote Otherwise, return \"NO\".\nnote For example:\nnote >>> exchange [1, 2, 3, 4] [1, 2, 3, 4]\nnote \"YES\"\nnote >>> exchange [1, 2, 3, 4] [1, 5, 3, 4]\nnote \"NO\"\nnote It is assumed that the input lists will be non-empty.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn exchange lst1 view long * lst2 view long * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_110_exchange.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\na1 = new long 4 0\nput a1 0 1\nput a1 1 2\nput a1 2 3\nput a1 3 4\nres = new uchar 4096 0\nr = exchange a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 83\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\na1 = new long 4 0\nput a1 0 1\nput a1 1 5\nput a1 2 3\nput a1 3 4\nres = new uchar 4096 0\nr = exchange a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 79\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\na1 = new long 4 0\nput a1 0 2\nput a1 1 1\nput a1 2 4\nput a1 3 3\nres = new uchar 4096 0\nr = exchange a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 83\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 3 0\nput a0 0 5\nput a0 1 7\nput a0 2 3\na1 = new long 3 0\nput a1 0 2\nput a1 1 6\nput a1 2 4\nres = new uchar 4096 0\nr = exchange a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 83\nret false\nend\nret true\nend\nfn tc_4 to bool\na0 = new long 3 0\nput a0 0 5\nput a0 1 7\nput a0 2 3\na1 = new long 3 0\nput a1 0 2\nput a1 1 6\nput a1 2 3\nres = new uchar 4096 0\nr = exchange a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 79\nret false\nend\nret true\nend\nfn tc_5 to bool\na0 = new long 6 0\nput a0 0 3\nput a0 1 2\nput a0 2 6\nput a0 3 1\nput a0 4 8\nput a0 5 9\na1 = new long 6 0\nput a1 0 3\nput a1 1 5\nput a1 2 5\nput a1 3 1\nput a1 4 1\nput a1 5 1\nres = new uchar 4096 0\nr = exchange a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 79\nret false\nend\nret true\nend\nfn tc_6 to bool\na0 = new long 2 0\nput a0 0 100\nput a0 1 200\na1 = new long 2 0\nput a1 0 200\nput a1 1 200\nres = new uchar 4096 0\nr = exchange a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_114_minSubArraySum", "language": "om", "prompt": "om2\nnote Given an array of integers nums, find the minimum sum of any non-empty sub-array\nnote of nums.\nnote Example\nnote >>> minSubArraySum [2, 3, 4, 1, 2, 4]\nnote 1\nnote >>> minSubArraySum [-1, -2, -3]\nnote -6\nfn minSubArraySum nums view long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_114_minSubArraySum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 6 0\nput a0 0 2\nput a0 1 3\nput a0 2 4\nput a0 3 1\nput a0 4 2\nput a0 5 4\nr = minSubArraySum a0\nret eq r 1\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 -3\nr = minSubArraySum a0\nret eq r -6\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 -3\nput a0 3 2\nput a0 4 -10\nr = minSubArraySum a0\nret eq r -14\nend\nfn tc_3 to bool\na0 = new long 1 0\nput a0 0 -9999999999999999\nr = minSubArraySum a0\nret eq r -9999999999999999\nend\nfn tc_4 to bool\na0 = new long 4 0\nput a0 0 0\nput a0 1 10\nput a0 2 20\nput a0 3 1000000\nr = minSubArraySum a0\nret eq r 0\nend\nfn tc_5 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 -3\nput a0 3 10\nput a0 4 -5\nr = minSubArraySum a0\nret eq r -6\nend\nfn tc_6 to bool\na0 = new long 6 0\nput a0 0 100\nput a0 1 -1\nput a0 2 -2\nput a0 3 -3\nput a0 4 10\nput a0 5 -5\nr = minSubArraySum a0\nret eq r -6\nend\nfn tc_7 to bool\na0 = new long 6 0\nput a0 0 10\nput a0 1 11\nput a0 2 13\nput a0 3 8\nput a0 4 3\nput a0 5 4\nr = minSubArraySum a0\nret eq r 3\nend\nfn tc_8 to bool\na0 = new long 6 0\nput a0 0 100\nput a0 1 -33\nput a0 2 32\nput a0 3 -1\nput a0 4 0\nput a0 5 -2\nr = minSubArraySum a0\nret eq r -33\nend\nfn tc_9 to bool\na0 = new long 1 0\nput a0 0 -10\nr = minSubArraySum a0\nret eq r -10\nend\nfn tc_10 to bool\na0 = new long 1 0\nput a0 0 7\nr = minSubArraySum a0\nret eq r 7\nend\nfn tc_11 to bool\na0 = new long 2 0\nput a0 0 1\nput a0 1 -1\nr = minSubArraySum a0\nret eq r -1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_116_sort_array", "language": "om", "prompt": "om2\nnote In this Kata, you have to sort an array of non-negative integers according to\nnote number of ones in their binary representation in ascending order.\nnote For similar number of ones, sort based on decimal value.\nnote It must be implemented like this:\nnote >>> sort_array [1, 5, 2, 3, 4]\nnote [1, 2, 3, 4, 5]\nnote >>> sort_array [-2, -3, -4, -5, -6]\nnote [-6, -5, -4, -3, -2]\nnote >>> sort_array [1, 0, 2, 3, 4]\nnote [0, 1, 2, 3, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn sort_array arr view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_116_sort_array.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 5\nput a0 2 2\nput a0 3 3\nput a0 4 4\nres = new long 4096 0\nr = sort_array a0 res\nif ne r 5\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 5\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 -2\nput a0 1 -3\nput a0 2 -4\nput a0 3 -5\nput a0 4 -6\nres = new long 4096 0\nr = sort_array a0 res\nif ne r 5\nret false\nend\nif ne get res 0 -4\nret false\nend\nif ne get res 1 -2\nret false\nend\nif ne get res 2 -6\nret false\nend\nif ne get res 3 -5\nret false\nend\nif ne get res 4 -3\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 0\nput a0 2 2\nput a0 3 3\nput a0 4 4\nres = new long 4096 0\nr = sort_array a0 res\nif ne r 5\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 1\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 3\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = sort_array part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_4 to bool\na0 = new long 11 0\nput a0 0 2\nput a0 1 5\nput a0 2 77\nput a0 3 4\nput a0 4 5\nput a0 5 3\nput a0 6 5\nput a0 7 7\nput a0 8 2\nput a0 9 3\nput a0 10 4\nres = new long 4096 0\nr = sort_array a0 res\nif ne r 11\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 3\nret false\nend\nif ne get res 6 5\nret false\nend\nif ne get res 7 5\nret false\nend\nif ne get res 8 5\nret false\nend\nif ne get res 9 7\nret false\nend\nif ne get res 10 77\nret false\nend\nret true\nend\nfn tc_5 to bool\na0 = new long 6 0\nput a0 0 3\nput a0 1 6\nput a0 2 44\nput a0 3 12\nput a0 4 32\nput a0 5 5\nres = new long 4096 0\nr = sort_array a0 res\nif ne r 6\nret false\nend\nif ne get res 0 32\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 6\nret false\nend\nif ne get res 4 12\nret false\nend\nif ne get res 5 44\nret false\nend\nret true\nend\nfn tc_6 to bool\na0 = new long 5 0\nput a0 0 2\nput a0 1 4\nput a0 2 8\nput a0 3 16\nput a0 4 32\nres = new long 4096 0\nr = sort_array a0 res\nif ne r 5\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 8\nret false\nend\nif ne get res 3 16\nret false\nend\nif ne get res 4 32\nret false\nend\nret true\nend\nfn tc_7 to bool\na0 = new long 5 0\nput a0 0 2\nput a0 1 4\nput a0 2 8\nput a0 3 16\nput a0 4 32\nres = new long 4096 0\nr = sort_array a0 res\nif ne r 5\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 8\nret false\nend\nif ne get res 3 16\nret false\nend\nif ne get res 4 32\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_118_get_closest_vowel", "language": "om", "prompt": "om2\nnote You are given a word. Your task is to find the closest vowel that stands between\nnote two consonants from the right side of the word (case sensitive).\nnote Vowels in the beginning and ending doesn't count. Return empty string if you didn't\nnote find any vowel met the above condition.\nnote You may assume that the given string contains English letter only.\nnote Example:\nnote >>> get_closest_vowel \"yogurt\"\nnote \"u\"\nnote >>> get_closest_vowel \"FULL\"\nnote \"U\"\nnote >>> get_closest_vowel \"quick\"\nnote \"\"\nnote >>> get_closest_vowel \"ab\"\nnote \"\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn get_closest_vowel word view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_118_get_closest_vowel.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"yogurt\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = get_closest_vowel t0_0 res\nif ne r 1\nret false\nend\nif ne get res 0 117\nret false\nend\nret true\nend\ntext t1_0 \"full\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = get_closest_vowel t1_0 res\nif ne r 1\nret false\nend\nif ne get res 0 117\nret false\nend\nret true\nend\ntext t2_0 \"easy\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = get_closest_vowel t2_0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t3_0 \"eAsy\"\nfn tc_3 to bool\nres = new uchar 4096 0\nr = get_closest_vowel t3_0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t4_0 \"ali\"\nfn tc_4 to bool\nres = new uchar 4096 0\nr = get_closest_vowel t4_0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t5_0 \"bad\"\nfn tc_5 to bool\nres = new uchar 4096 0\nr = get_closest_vowel t5_0 res\nif ne r 1\nret false\nend\nif ne get res 0 97\nret false\nend\nret true\nend\ntext t6_0 \"most\"\nfn tc_6 to bool\nres = new uchar 4096 0\nr = get_closest_vowel t6_0 res\nif ne r 1\nret false\nend\nif ne get res 0 111\nret false\nend\nret true\nend\ntext t7_0 \"ab\"\nfn tc_7 to bool\nres = new uchar 4096 0\nr = get_closest_vowel t7_0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t8_0 \"ba\"\nfn tc_8 to bool\nres = new uchar 4096 0\nr = get_closest_vowel t8_0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t9_0 \"quick\"\nfn tc_9 to bool\nres = new uchar 4096 0\nr = get_closest_vowel t9_0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t10_0 \"anime\"\nfn tc_10 to bool\nres = new uchar 4096 0\nr = get_closest_vowel t10_0 res\nif ne r 1\nret false\nend\nif ne get res 0 105\nret false\nend\nret true\nend\ntext t11_0 \"Asia\"\nfn tc_11 to bool\nres = new uchar 4096 0\nr = get_closest_vowel t11_0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t12_0 \"Above\"\nfn tc_12 to bool\nres = new uchar 4096 0\nr = get_closest_vowel t12_0 res\nif ne r 1\nret false\nend\nif ne get res 0 111\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nif not tc_12\nret 13\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_120_maximum", "language": "om", "prompt": "om2\nnote Given an array arr of integers and a positive integer k, return a sorted array\nnote of length k with the maximum k numbers in arr.\nnote Example 1:\nnote >>> maximum [-3, -4, 5] 3\nnote [-4, -3, 5]\nnote Example 2:\nnote >>> maximum [4, -4, 4] 2\nnote [4, 4]\nnote Example 3:\nnote >>> maximum [-3, 2, 1, 2, -1, -2, 1] 1\nnote [2]\nnote Note:\nnote 1. The length of the array will be in the range of [1, 1000].\nnote 2. The elements in the array will be in the range of [-1000, 1000].\nnote 3. 0 <= k <= len(arr)\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn maximum arr view long * k long res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_120_maximum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 -3\nput a0 1 -4\nput a0 2 5\nres = new long 4096 0\nr = maximum a0 3 res\nif ne r 3\nret false\nend\nif ne get res 0 -4\nret false\nend\nif ne get res 1 -3\nret false\nend\nif ne get res 2 5\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 4\nput a0 1 -4\nput a0 2 4\nres = new long 4096 0\nr = maximum a0 2 res\nif ne r 2\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 7 0\nput a0 0 -3\nput a0 1 2\nput a0 2 1\nput a0 3 2\nput a0 4 -1\nput a0 5 -2\nput a0 6 1\nres = new long 4096 0\nr = maximum a0 1 res\nif ne r 1\nret false\nend\nif ne get res 0 2\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 7 0\nput a0 0 123\nput a0 1 -123\nput a0 2 20\nput a0 3 0\nput a0 4 1\nput a0 5 2\nput a0 6 -3\nres = new long 4096 0\nr = maximum a0 3 res\nif ne r 3\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 20\nret false\nend\nif ne get res 2 123\nret false\nend\nret true\nend\nfn tc_4 to bool\na0 = new long 6 0\nput a0 0 -123\nput a0 1 20\nput a0 2 0\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nres = new long 4096 0\nr = maximum a0 4 res\nif ne r 4\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 1\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 20\nret false\nend\nret true\nend\nfn tc_5 to bool\na0 = new long 7 0\nput a0 0 5\nput a0 1 15\nput a0 2 0\nput a0 3 3\nput a0 4 -13\nput a0 5 -8\nput a0 6 0\nres = new long 4096 0\nr = maximum a0 7 res\nif ne r 7\nret false\nend\nif ne get res 0 -13\nret false\nend\nif ne get res 1 -8\nret false\nend\nif ne get res 2 0\nret false\nend\nif ne get res 3 0\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 5\nret false\nend\nif ne get res 6 15\nret false\nend\nret true\nend\nfn tc_6 to bool\na0 = new long 6 0\nput a0 0 -1\nput a0 1 0\nput a0 2 2\nput a0 3 5\nput a0 4 3\nput a0 5 -10\nres = new long 4096 0\nr = maximum a0 2 res\nif ne r 2\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 5\nret false\nend\nret true\nend\nfn tc_7 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 0\nput a0 2 5\nput a0 3 -7\nres = new long 4096 0\nr = maximum a0 1 res\nif ne r 1\nret false\nend\nif ne get res 0 5\nret false\nend\nret true\nend\nfn tc_8 to bool\na0 = new long 2 0\nput a0 0 4\nput a0 1 -4\nres = new long 4096 0\nr = maximum a0 2 res\nif ne r 2\nret false\nend\nif ne get res 0 -4\nret false\nend\nif ne get res 1 4\nret false\nend\nret true\nend\nfn tc_9 to bool\na0 = new long 2 0\nput a0 0 -10\nput a0 1 10\nres = new long 4096 0\nr = maximum a0 2 res\nif ne r 2\nret false\nend\nif ne get res 0 -10\nret false\nend\nif ne get res 1 10\nret false\nend\nret true\nend\nfn tc_10 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 -23\nput a0 4 243\nput a0 5 -400\nput a0 6 0\nres = new long 4096 0\nr = maximum a0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_121_solution", "language": "om", "prompt": "om2\nnote Given a non-empty array of integers, return the sum of all of the odd elements that are in even positions.\nnote Examples\nnote >>> solution [5, 8, 7, 1]\nnote 12\nnote >>> solution [3, 3, 3, 3, 3]\nnote 9\nnote >>> solution [30, 13, 24, 321]\nnote 0\nfn solution lst view long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_121_solution.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 5\nput a0 1 8\nput a0 2 7\nput a0 3 1\nr = solution a0\nret eq r 12\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 3\nput a0 2 3\nput a0 3 3\nput a0 4 3\nr = solution a0\nret eq r 9\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 30\nput a0 1 13\nput a0 2 24\nput a0 3 321\nr = solution a0\nret eq r 0\nend\nfn tc_3 to bool\na0 = new long 2 0\nput a0 0 5\nput a0 1 9\nr = solution a0\nret eq r 5\nend\nfn tc_4 to bool\na0 = new long 3 0\nput a0 0 2\nput a0 1 4\nput a0 2 8\nr = solution a0\nret eq r 0\nend\nfn tc_5 to bool\na0 = new long 4 0\nput a0 0 30\nput a0 1 13\nput a0 2 23\nput a0 3 32\nr = solution a0\nret eq r 23\nend\nfn tc_6 to bool\na0 = new long 4 0\nput a0 0 3\nput a0 1 13\nput a0 2 2\nput a0 3 9\nr = solution a0\nret eq r 3\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_122_add_elements", "language": "om", "prompt": "om2\nnote Given a non-empty array of integers arr and an integer k, return\nnote the sum of the elements with at most two digits from the first k elements of arr.\nnote Example:\nnote >>> add_elements [111, 21, 3, 4000, 5, 6, 7, 8, 9] 4\nnote 24\nnote Constraints:\nnote 1. 1 <= len(arr) <= 100\nnote 2. 1 <= k <= len(arr)\nfn add_elements arr view long * k long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_122_add_elements.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 9 0\nput a0 0 1\nput a0 1 -2\nput a0 2 -3\nput a0 3 41\nput a0 4 57\nput a0 5 76\nput a0 6 87\nput a0 7 88\nput a0 8 99\nr = add_elements a0 3\nret eq r -4\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 111\nput a0 1 121\nput a0 2 3\nput a0 3 4000\nput a0 4 5\nput a0 5 6\nr = add_elements a0 2\nret eq r 0\nend\nfn tc_2 to bool\na0 = new long 9 0\nput a0 0 11\nput a0 1 21\nput a0 2 3\nput a0 3 90\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nr = add_elements a0 4\nret eq r 125\nend\nfn tc_3 to bool\na0 = new long 9 0\nput a0 0 111\nput a0 1 21\nput a0 2 3\nput a0 3 4000\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nr = add_elements a0 4\nret eq r 24\nend\nfn tc_4 to bool\na0 = new long 1 0\nput a0 0 1\nr = add_elements a0 1\nret eq r 1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_123_get_odd_collatz", "language": "om", "prompt": "om2\nnote Given a positive integer n, return a sorted array that has the odd numbers in collatz sequence.\nnote The Collatz conjecture is a conjecture in mathematics that concerns a sequence defined\nnote as follows: start with any positive integer n. Then each term is obtained from the\nnote previous term as follows: if the previous term is even, the next term is one half of\nnote the previous term. If the previous term is odd, the next term is 3 times the previous\nnote term plus 1. The conjecture is that no matter what value of n, the sequence will always reach 1.\nnote Note:\nnote 1. Collatz(1) is [1].\nnote 2. returned array sorted in increasing order.\nnote For example:\nnote get_odd_collatz(5) returns [1, 5] # The collatz sequence for 5 is [5, 16, 8, 4, 2, 1], so the odd numbers are only 1, and 5.\nnote >>> get_odd_collatz 5\nnote [1, 5]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_odd_collatz n long res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_123_get_odd_collatz.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = get_odd_collatz 14 res\nif ne r 6\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 7\nret false\nend\nif ne get res 3 11\nret false\nend\nif ne get res 4 13\nret false\nend\nif ne get res 5 17\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = get_odd_collatz 5 res\nif ne r 2\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 5\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = get_odd_collatz 12 res\nif ne r 3\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 5\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new long 4096 0\nr = get_odd_collatz 1 res\nif ne r 1\nret false\nend\nif ne get res 0 1\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_124_valid_date", "language": "om", "prompt": "om2\nnote You have to write a function which validates a given date string and\nnote returns true if the date is valid otherwise false.\nnote The date is valid if all of the following rules are satisfied:\nnote 1. The date string is not empty.\nnote 2. The number of days is not less than 1 or higher than 31 days for months 1,3,5,7,8,10,12. And the number of days is not less than 1 or higher than 30 days for months 4,6,9,11. And, the number of days is not less than 1 or higher than 29 for the month 2.\nnote 3. The months should not be less than 1 or higher than 12.\nnote 4. The date should be in the format: mm-dd-yyyy\nnote >>> valid_date \"03-11-2000\"\nnote true\nnote >>> valid_date \"15-01-2012\"\nnote false\nnote >>> valid_date \"04-0-2040\"\nnote false\nnote >>> valid_date \"06-04-2020\"\nnote true\nnote >>> valid_date \"06/04/2020\"\nnote false\nfn valid_date date view uchar * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_124_valid_date.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"03-11-2000\"\nfn tc_0 to bool\nr = valid_date t0_0\nret eq r true\nend\ntext t1_0 \"15-01-2012\"\nfn tc_1 to bool\nr = valid_date t1_0\nret eq r false\nend\ntext t2_0 \"04-0-2040\"\nfn tc_2 to bool\nr = valid_date t2_0\nret eq r false\nend\ntext t3_0 \"06-04-2020\"\nfn tc_3 to bool\nr = valid_date t3_0\nret eq r true\nend\ntext t4_0 \"01-01-2007\"\nfn tc_4 to bool\nr = valid_date t4_0\nret eq r true\nend\ntext t5_0 \"03-32-2011\"\nfn tc_5 to bool\nr = valid_date t5_0\nret eq r false\nend\nfn tc_6 to bool\na0 = new uchar 1 0\nr = valid_date part a0 0 0\nret eq r false\nend\ntext t7_0 \"04-31-3000\"\nfn tc_7 to bool\nr = valid_date t7_0\nret eq r false\nend\ntext t8_0 \"06-06-2005\"\nfn tc_8 to bool\nr = valid_date t8_0\nret eq r true\nend\ntext t9_0 \"21-31-2000\"\nfn tc_9 to bool\nr = valid_date t9_0\nret eq r false\nend\ntext t10_0 \"04-12-2003\"\nfn tc_10 to bool\nr = valid_date t10_0\nret eq r true\nend\ntext t11_0 \"04122003\"\nfn tc_11 to bool\nr = valid_date t11_0\nret eq r false\nend\ntext t12_0 \"20030412\"\nfn tc_12 to bool\nr = valid_date t12_0\nret eq r false\nend\ntext t13_0 \"2003-04\"\nfn tc_13 to bool\nr = valid_date t13_0\nret eq r false\nend\ntext t14_0 \"2003-04-12\"\nfn tc_14 to bool\nr = valid_date t14_0\nret eq r false\nend\ntext t15_0 \"04-2003\"\nfn tc_15 to bool\nr = valid_date t15_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nif not tc_12\nret 13\nend\nif not tc_13\nret 14\nend\nif not tc_14\nret 15\nend\nif not tc_15\nret 16\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_126_is_sorted", "language": "om", "prompt": "om2\nnote Given an array of numbers, return whether or not they are sorted\nnote in ascending order. If array has more than 1 duplicate of the same\nnote number, return false. Assume no negative numbers and only integers.\nnote Examples\nnote >>> is_sorted [5]\nnote true\nnote >>> is_sorted [1, 2, 3, 4, 5]\nnote true\nnote >>> is_sorted [1, 3, 2, 4, 5]\nnote false\nnote >>> is_sorted [1, 2, 3, 4, 5, 6]\nnote true\nnote >>> is_sorted [1, 2, 3, 4, 5, 6, 7]\nnote true\nnote >>> is_sorted [1, 3, 2, 4, 5, 6, 7]\nnote false\nnote >>> is_sorted [1, 2, 2, 3, 3, 4]\nnote true\nnote >>> is_sorted [1, 2, 2, 2, 3, 4]\nnote false\nfn is_sorted lst view long * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_126_is_sorted.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 1 0\nput a0 0 5\nr = is_sorted a0\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nr = is_sorted a0\nret eq r true\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 3\nput a0 2 2\nput a0 3 4\nput a0 4 5\nr = is_sorted a0\nret eq r false\nend\nfn tc_3 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nr = is_sorted a0\nret eq r true\nend\nfn tc_4 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nr = is_sorted a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 3\nput a0 2 2\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nr = is_sorted a0\nret eq r false\nend\nfn tc_6 to bool\na0 = new long 1 0\nr = is_sorted part a0 0 0\nret eq r true\nend\nfn tc_7 to bool\na0 = new long 1 0\nput a0 0 1\nr = is_sorted a0\nret eq r true\nend\nfn tc_8 to bool\na0 = new long 3 0\nput a0 0 3\nput a0 1 2\nput a0 2 1\nr = is_sorted a0\nret eq r false\nend\nfn tc_9 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 2\nput a0 3 2\nput a0 4 3\nput a0 5 4\nr = is_sorted a0\nret eq r false\nend\nfn tc_10 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 3\nput a0 4 3\nput a0 5 4\nr = is_sorted a0\nret eq r false\nend\nfn tc_11 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 2\nput a0 3 3\nput a0 4 3\nput a0 5 4\nr = is_sorted a0\nret eq r true\nend\nfn tc_12 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nr = is_sorted a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nif not tc_12\nret 13\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_127_intersection", "language": "om", "prompt": "om2\nnote You are given two intervals,\nnote where each interval is a pair of integers. For example, interval = (start, end) = (1, 2).\nnote The given intervals are closed which means that the interval (start, end)\nnote includes both start and end.\nnote For each given interval, it is assumed that its start is less or equal its end.\nnote Your task is to determine whether the length of intersection of these two\nnote intervals is a prime number.\nnote Example, the intersection of the intervals (1, 3), (2, 4) is (2, 3)\nnote which its length is 1, which not a prime number.\nnote If the length of the intersection is a prime number, return \"YES\",\nnote otherwise, return \"NO\".\nnote If the two intervals don't intersect, return \"NO\".\nnote [input/output] samples:\nnote >>> intersection (1, 2) (2, 3)\nnote \"NO\"\nnote >>> intersection (-1, 1) (0, 4)\nnote \"NO\"\nnote >>> intersection (-3, -1) (-5, 5)\nnote \"YES\"\nnote Omega name: interval1 is interval here.\nnote Omega name: interval2 is interva_ here.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn intersection interval view long * interva_ view long * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_127_intersection.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 2 0\nput a0 0 1\nput a0 1 2\na1 = new long 2 0\nput a1 0 2\nput a1 1 3\nres = new uchar 4096 0\nr = intersection a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 79\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 1\na1 = new long 2 0\nput a1 0 0\nput a1 1 4\nres = new uchar 4096 0\nr = intersection a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 79\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -3\nput a0 1 -1\na1 = new long 2 0\nput a1 0 -5\nput a1 1 5\nres = new uchar 4096 0\nr = intersection a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 83\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 2 0\nput a0 0 -2\nput a0 1 2\na1 = new long 2 0\nput a1 0 -4\nput a1 1 0\nres = new uchar 4096 0\nr = intersection a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 83\nret false\nend\nret true\nend\nfn tc_4 to bool\na0 = new long 2 0\nput a0 0 -11\nput a0 1 2\na1 = new long 2 0\nput a1 0 -1\nput a1 1 -1\nres = new uchar 4096 0\nr = intersection a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 79\nret false\nend\nret true\nend\nfn tc_5 to bool\na0 = new long 2 0\nput a0 0 1\nput a0 1 2\na1 = new long 2 0\nput a1 0 3\nput a1 1 5\nres = new uchar 4096 0\nr = intersection a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 79\nret false\nend\nret true\nend\nfn tc_6 to bool\na0 = new long 2 0\nput a0 0 1\nput a0 1 2\na1 = new long 2 0\nput a1 0 1\nput a1 1 2\nres = new uchar 4096 0\nr = intersection a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 79\nret false\nend\nret true\nend\nfn tc_7 to bool\na0 = new long 2 0\nput a0 0 -2\nput a0 1 -2\na1 = new long 2 0\nput a1 0 -3\nput a1 1 -2\nres = new uchar 4096 0\nr = intersection a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 79\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_130_tri", "language": "om", "prompt": "om2\nnote Everyone knows Fibonacci sequence, it was studied deeply by mathematicians in\nnote the last couple centuries. However, what people don't know is Tribonacci sequence.\nnote Tribonacci sequence is defined by the recurrence:\nnote tri(1) = 3\nnote tri(n) = 1 + n / 2, if n is even.\nnote tri(n) = tri(n - 1) + tri(n - 2) + tri(n + 1), if n is odd.\nnote For example:\nnote tri(2) = 1 + (2 / 2) = 2\nnote tri(4) = 3\nnote tri(3) = tri(2) + tri(1) + tri(4)\nnote = 2 + 3 + 3 = 8\nnote You are given a non-negative integer number n, you have to a return an array of the\nnote first n + 1 numbers of the Tribonacci sequence.\nnote Examples:\nnote >>> tri 3\nnote [1, 3, 2, 8]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn tri n long res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_130_tri.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = tri 3 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 8\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = tri 4 res\nif ne r 5\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 8\nret false\nend\nif ne get res 4 3\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = tri 5 res\nif ne r 6\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 8\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 15\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new long 4096 0\nr = tri 6 res\nif ne r 7\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 8\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 15\nret false\nend\nif ne get res 6 4\nret false\nend\nret true\nend\nfn tc_4 to bool\nres = new long 4096 0\nr = tri 7 res\nif ne r 8\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 8\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 15\nret false\nend\nif ne get res 6 4\nret false\nend\nif ne get res 7 24\nret false\nend\nret true\nend\nfn tc_5 to bool\nres = new long 4096 0\nr = tri 8 res\nif ne r 9\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 8\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 15\nret false\nend\nif ne get res 6 4\nret false\nend\nif ne get res 7 24\nret false\nend\nif ne get res 8 5\nret false\nend\nret true\nend\nfn tc_6 to bool\nres = new long 4096 0\nr = tri 9 res\nif ne r 10\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 8\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 15\nret false\nend\nif ne get res 6 4\nret false\nend\nif ne get res 7 24\nret false\nend\nif ne get res 8 5\nret false\nend\nif ne get res 9 35\nret false\nend\nret true\nend\nfn tc_7 to bool\nres = new long 4096 0\nr = tri 20 res\nif ne r 21\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 8\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 15\nret false\nend\nif ne get res 6 4\nret false\nend\nif ne get res 7 24\nret false\nend\nif ne get res 8 5\nret false\nend\nif ne get res 9 35\nret false\nend\nif ne get res 10 6\nret false\nend\nif ne get res 11 48\nret false\nend\nif ne get res 12 7\nret false\nend\nif ne get res 13 63\nret false\nend\nif ne get res 14 8\nret false\nend\nif ne get res 15 80\nret false\nend\nif ne get res 16 9\nret false\nend\nif ne get res 17 99\nret false\nend\nif ne get res 18 10\nret false\nend\nif ne get res 19 120\nret false\nend\nif ne get res 20 11\nret false\nend\nret true\nend\nfn tc_8 to bool\nres = new long 4096 0\nr = tri 0 res\nif ne r 1\nret false\nend\nif ne get res 0 1\nret false\nend\nret true\nend\nfn tc_9 to bool\nres = new long 4096 0\nr = tri 1 res\nif ne r 2\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_131_digits", "language": "om", "prompt": "om2\nnote Given a positive integer n, return the product of the odd digits.\nnote Return 0 if all digits are even.\nnote For example:\nnote >>> digits 1\nnote 1\nnote >>> digits 4\nnote 0\nnote >>> digits 235\nnote 15\nfn digits n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_131_digits.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = digits 5\nret eq r 5\nend\nfn tc_1 to bool\nr = digits 54\nret eq r 5\nend\nfn tc_2 to bool\nr = digits 120\nret eq r 1\nend\nfn tc_3 to bool\nr = digits 5014\nret eq r 5\nend\nfn tc_4 to bool\nr = digits 98765\nret eq r 315\nend\nfn tc_5 to bool\nr = digits 5576543\nret eq r 2625\nend\nfn tc_6 to bool\nr = digits 2468\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_132_is_nested", "language": "om", "prompt": "om2\nnote Create a function that takes a string as input which contains only square brackets.\nnote The function should return true if and only if there is a valid subsequence of brackets\nnote where at least one bracket in the subsequence is nested.\nnote >>> is_nested \"[[]]\"\nnote true\nnote >>> is_nested \"[]]]]]]][[[[[]\"\nnote false\nnote >>> is_nested \"[][]\"\nnote false\nnote >>> is_nested \"[]\"\nnote false\nnote >>> is_nested \"[[][]]\"\nnote true\nnote >>> is_nested \"[[]][[\"\nnote true\nfn is_nested string view uchar * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_132_is_nested.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"[[]]\"\nfn tc_0 to bool\nr = is_nested t0_0\nret eq r true\nend\ntext t1_0 \"[]]]]]]][[[[[]\"\nfn tc_1 to bool\nr = is_nested t1_0\nret eq r false\nend\ntext t2_0 \"[][]\"\nfn tc_2 to bool\nr = is_nested t2_0\nret eq r false\nend\ntext t3_0 \"[]\"\nfn tc_3 to bool\nr = is_nested t3_0\nret eq r false\nend\ntext t4_0 \"[[[[]]]]\"\nfn tc_4 to bool\nr = is_nested t4_0\nret eq r true\nend\ntext t5_0 \"[]]]]]]]]]]\"\nfn tc_5 to bool\nr = is_nested t5_0\nret eq r false\nend\ntext t6_0 \"[][][[]]\"\nfn tc_6 to bool\nr = is_nested t6_0\nret eq r true\nend\ntext t7_0 \"[[]\"\nfn tc_7 to bool\nr = is_nested t7_0\nret eq r false\nend\ntext t8_0 \"[]]\"\nfn tc_8 to bool\nr = is_nested t8_0\nret eq r false\nend\ntext t9_0 \"[[]][[\"\nfn tc_9 to bool\nr = is_nested t9_0\nret eq r true\nend\ntext t10_0 \"[[][]]\"\nfn tc_10 to bool\nr = is_nested t10_0\nret eq r true\nend\nfn tc_11 to bool\na0 = new uchar 1 0\nr = is_nested part a0 0 0\nret eq r false\nend\ntext t12_0 \"[[[[[[[[\"\nfn tc_12 to bool\nr = is_nested t12_0\nret eq r false\nend\ntext t13_0 \"]]]]]]]]\"\nfn tc_13 to bool\nr = is_nested t13_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nif not tc_12\nret 13\nend\nif not tc_13\nret 14\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_133_sum_squares", "language": "om", "prompt": "om2\nnote You are given an array of numbers.\nnote You need to return the sum of squared numbers in the given array,\nnote round each element in the array to the upper int(Ceiling) first.\nnote Examples:\nnote >>> lst [1.0, 2.0, 3.0]\nnote 14\nnote >>> lst [1.0, 4.0, 9.0]\nnote 98\nnote >>> lst [1.0, 3.0, 5.0, 7.0]\nnote 84\nnote >>> lst [1.4, 4.2, 0.0]\nnote 29\nnote >>> lst [-2.4, 1.0, 1.0]\nnote 6\nfn sum_squares lst view f64 * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_133_sum_squares.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new f64 3 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nr = sum_squares a0\nret eq r 14\nend\nfn tc_1 to bool\na0 = new f64 3 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nr = sum_squares a0\nret eq r 14\nend\nfn tc_2 to bool\na0 = new f64 4 0.0\nput a0 0 1.0\nput a0 1 3.0\nput a0 2 5.0\nput a0 3 7.0\nr = sum_squares a0\nret eq r 84\nend\nfn tc_3 to bool\na0 = new f64 3 0.0\nput a0 0 1.4\nput a0 1 4.2\nput a0 2 0.0\nr = sum_squares a0\nret eq r 29\nend\nfn tc_4 to bool\na0 = new f64 3 0.0\nput a0 0 -2.4\nput a0 1 1.0\nput a0 2 1.0\nr = sum_squares a0\nret eq r 6\nend\nfn tc_5 to bool\na0 = new f64 4 0.0\nput a0 0 100.0\nput a0 1 1.0\nput a0 2 15.0\nput a0 3 2.0\nr = sum_squares a0\nret eq r 10230\nend\nfn tc_6 to bool\na0 = new f64 2 0.0\nput a0 0 10000.0\nput a0 1 10000.0\nr = sum_squares a0\nret eq r 200000000\nend\nfn tc_7 to bool\na0 = new f64 3 0.0\nput a0 0 -1.4\nput a0 1 4.6\nput a0 2 6.3\nr = sum_squares a0\nret eq r 75\nend\nfn tc_8 to bool\na0 = new f64 4 0.0\nput a0 0 -1.4\nput a0 1 17.9\nput a0 2 18.9\nput a0 3 19.9\nr = sum_squares a0\nret eq r 1086\nend\nfn tc_9 to bool\na0 = new f64 1 0.0\nput a0 0 0.0\nr = sum_squares a0\nret eq r 0\nend\nfn tc_10 to bool\na0 = new f64 1 0.0\nput a0 0 -1.0\nr = sum_squares a0\nret eq r 1\nend\nfn tc_11 to bool\na0 = new f64 3 0.0\nput a0 0 -1.0\nput a0 1 1.0\nput a0 2 0.0\nr = sum_squares a0\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_134_check_if_last_char_is_a_letter", "language": "om", "prompt": "om2\nnote Create a function that returns true if the last character\nnote of a given string is an alphabetical character and is not\nnote a part of a word, and false otherwise.\nnote Note: \"word\" is a group of characters separated by space.\nnote Examples:\nnote >>> check_if_last_char_is_a_letter \"apple pie\"\nnote false\nnote >>> check_if_last_char_is_a_letter \"apple pi e\"\nnote true\nnote >>> check_if_last_char_is_a_letter \"apple pi e \"\nnote false\nnote >>> check_if_last_char_is_a_letter \"\"\nnote false\nfn check_if_last_char_is_a_letter txt view uchar * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_134_check_if_last_char_is_a_letter.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"apple\"\nfn tc_0 to bool\nr = check_if_last_char_is_a_letter t0_0\nret eq r false\nend\ntext t1_0 \"apple pi e\"\nfn tc_1 to bool\nr = check_if_last_char_is_a_letter t1_0\nret eq r true\nend\ntext t2_0 \"eeeee\"\nfn tc_2 to bool\nr = check_if_last_char_is_a_letter t2_0\nret eq r false\nend\ntext t3_0 \"A\"\nfn tc_3 to bool\nr = check_if_last_char_is_a_letter t3_0\nret eq r true\nend\ntext t4_0 \"Pumpkin pie \"\nfn tc_4 to bool\nr = check_if_last_char_is_a_letter t4_0\nret eq r false\nend\ntext t5_0 \"Pumpkin pie 1\"\nfn tc_5 to bool\nr = check_if_last_char_is_a_letter t5_0\nret eq r false\nend\nfn tc_6 to bool\na0 = new uchar 1 0\nr = check_if_last_char_is_a_letter part a0 0 0\nret eq r false\nend\ntext t7_0 \"eeeee e \"\nfn tc_7 to bool\nr = check_if_last_char_is_a_letter t7_0\nret eq r false\nend\ntext t8_0 \"apple pie\"\nfn tc_8 to bool\nr = check_if_last_char_is_a_letter t8_0\nret eq r false\nend\ntext t9_0 \"apple pi e \"\nfn tc_9 to bool\nr = check_if_last_char_is_a_letter t9_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_135_can_arrange", "language": "om", "prompt": "om2\nnote Create a function which returns the largest index of an element which\nnote is not greater than or equal to the element immediately preceding it. If\nnote no such element exists then return -1. The given array will not contain\nnote duplicate values.\nnote Examples:\nnote >>> can_arrange [1, 2, 4, 3, 5]\nnote 3\nnote >>> can_arrange [1, 2, 3]\nnote -1\nfn can_arrange arr view long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_135_can_arrange.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 3\nput a0 4 5\nr = can_arrange a0\nret eq r 3\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 5\nr = can_arrange a0\nret eq r -1\nend\nfn tc_2 to bool\na0 = new long 9 0\nput a0 0 1\nput a0 1 4\nput a0 2 2\nput a0 3 5\nput a0 4 6\nput a0 5 7\nput a0 6 8\nput a0 7 9\nput a0 8 10\nr = can_arrange a0\nret eq r 2\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 4\nput a0 1 8\nput a0 2 5\nput a0 3 7\nput a0 4 3\nr = can_arrange a0\nret eq r 4\nend\nfn tc_4 to bool\na0 = new long 1 0\nr = can_arrange part a0 0 0\nret eq r -1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_138_is_equal_to_sum_even", "language": "om", "prompt": "om2\nnote Evaluate whether the given number n can be written as the sum of exactly 4 positive even numbers\nnote Example\nnote >>> is_equal_to_sum_even 4\nnote false\nnote >>> is_equal_to_sum_even 6\nnote false\nnote >>> is_equal_to_sum_even 8\nnote true\nfn is_equal_to_sum_even n long to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_138_is_equal_to_sum_even.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_equal_to_sum_even 4\nret eq r false\nend\nfn tc_1 to bool\nr = is_equal_to_sum_even 6\nret eq r false\nend\nfn tc_2 to bool\nr = is_equal_to_sum_even 8\nret eq r true\nend\nfn tc_3 to bool\nr = is_equal_to_sum_even 10\nret eq r true\nend\nfn tc_4 to bool\nr = is_equal_to_sum_even 11\nret eq r false\nend\nfn tc_5 to bool\nr = is_equal_to_sum_even 12\nret eq r true\nend\nfn tc_6 to bool\nr = is_equal_to_sum_even 13\nret eq r false\nend\nfn tc_7 to bool\nr = is_equal_to_sum_even 16\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_139_special_factorial", "language": "om", "prompt": "om2\nnote The Brazilian factorial is defined as:\nnote brazilian_factorial(n) = n! * (n-1)! * (n-2)! * ... * 1!\nnote where n > 0\nnote For example:\nnote >>> special_factorial 4\nnote 288\nnote The function will receive an integer as input and should return the special\nnote factorial of this integer.\nfn special_factorial n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_139_special_factorial.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = special_factorial 4\nret eq r 288\nend\nfn tc_1 to bool\nr = special_factorial 5\nret eq r 34560\nend\nfn tc_2 to bool\nr = special_factorial 7\nret eq r 125411328000\nend\nfn tc_3 to bool\nr = special_factorial 1\nret eq r 1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_140_fix_spaces", "language": "om", "prompt": "om2\nnote Given a string text, replace all spaces in it with underscores,\nnote and if a string has more than 2 consecutive spaces,\nnote then replace all consecutive spaces with -\nnote >>> fix_spaces \"Example\"\nnote \"Example\"\nnote >>> fix_spaces \"Example 1\"\nnote \"Example_1\"\nnote >>> fix_spaces \" Example 2\"\nnote \"_Example_2\"\nnote >>> fix_spaces \" Example 3\"\nnote \"_Example-3\"\nnote Omega name: text is text_ here.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn fix_spaces text_ view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_140_fix_spaces.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"Example\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = fix_spaces t0_0 res\nif ne r 7\nret false\nend\nif ne get res 0 69\nret false\nend\nif ne get res 1 120\nret false\nend\nif ne get res 2 97\nret false\nend\nif ne get res 3 109\nret false\nend\nif ne get res 4 112\nret false\nend\nif ne get res 5 108\nret false\nend\nif ne get res 6 101\nret false\nend\nret true\nend\ntext t1_0 \"Mudasir Hanif \"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = fix_spaces t1_0 res\nif ne r 14\nret false\nend\nif ne get res 0 77\nret false\nend\nif ne get res 1 117\nret false\nend\nif ne get res 2 100\nret false\nend\nif ne get res 3 97\nret false\nend\nif ne get res 4 115\nret false\nend\nif ne get res 5 105\nret false\nend\nif ne get res 6 114\nret false\nend\nif ne get res 7 95\nret false\nend\nif ne get res 8 72\nret false\nend\nif ne get res 9 97\nret false\nend\nif ne get res 10 110\nret false\nend\nif ne get res 11 105\nret false\nend\nif ne get res 12 102\nret false\nend\nif ne get res 13 95\nret false\nend\nret true\nend\ntext t2_0 \"Yellow Yellow Dirty Fellow\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = fix_spaces t2_0 res\nif ne r 28\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 108\nret false\nend\nif ne get res 3 108\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 119\nret false\nend\nif ne get res 6 95\nret false\nend\nif ne get res 7 89\nret false\nend\nif ne get res 8 101\nret false\nend\nif ne get res 9 108\nret false\nend\nif ne get res 10 108\nret false\nend\nif ne get res 11 111\nret false\nend\nif ne get res 12 119\nret false\nend\nif ne get res 13 95\nret false\nend\nif ne get res 14 95\nret false\nend\nif ne get res 15 68\nret false\nend\nif ne get res 16 105\nret false\nend\nif ne get res 17 114\nret false\nend\nif ne get res 18 116\nret false\nend\nif ne get res 19 121\nret false\nend\nif ne get res 20 95\nret false\nend\nif ne get res 21 95\nret false\nend\nif ne get res 22 70\nret false\nend\nif ne get res 23 101\nret false\nend\nif ne get res 24 108\nret false\nend\nif ne get res 25 108\nret false\nend\nif ne get res 26 111\nret false\nend\nif ne get res 27 119\nret false\nend\nret true\nend\ntext t3_0 \"Exa mple\"\nfn tc_3 to bool\nres = new uchar 4096 0\nr = fix_spaces t3_0 res\nif ne r 8\nret false\nend\nif ne get res 0 69\nret false\nend\nif ne get res 1 120\nret false\nend\nif ne get res 2 97\nret false\nend\nif ne get res 3 45\nret false\nend\nif ne get res 4 109\nret false\nend\nif ne get res 5 112\nret false\nend\nif ne get res 6 108\nret false\nend\nif ne get res 7 101\nret false\nend\nret true\nend\ntext t4_0 \" Exa 1 2 2 mple\"\nfn tc_4 to bool\nres = new uchar 4096 0\nr = fix_spaces t4_0 res\nif ne r 15\nret false\nend\nif ne get res 0 45\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 120\nret false\nend\nif ne get res 3 97\nret false\nend\nif ne get res 4 95\nret false\nend\nif ne get res 5 49\nret false\nend\nif ne get res 6 95\nret false\nend\nif ne get res 7 50\nret false\nend\nif ne get res 8 95\nret false\nend\nif ne get res 9 50\nret false\nend\nif ne get res 10 95\nret false\nend\nif ne get res 11 109\nret false\nend\nif ne get res 12 112\nret false\nend\nif ne get res 13 108\nret false\nend\nif ne get res 14 101\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_141_file_name_check", "language": "om", "prompt": "om2\nnote Create a function which takes a string representing a file's name, and returns\nnote 'Yes' if the the file's name is valid, and returns 'No' otherwise.\nnote A file's name is considered to be valid if and only if all the following conditions\nnote are met:\nnote - There should not be more than three digits ('0'-'9') in the file's name.\nnote - The file's name contains exactly one dot '.'\nnote - The substring before the dot should not be empty, and it starts with a letter from\nnote the latin alphapet ('a'-'z' and 'A'-'Z').\nnote - The substring after the dot should be one of these: ['txt', 'exe', 'dll']\nnote Examples:\nnote >>> file_name_check \"example.txt\"\nnote \"Yes\"\nnote >>> file_name_check \"1example.dll\"\nnote \"No\"\nnote Omega name: file_name is file_nam here.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn file_name_check file_nam view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_141_file_name_check.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"example.txt\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = file_name_check t0_0 res\nif ne r 3\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 115\nret false\nend\nret true\nend\ntext t1_0 \"1example.dll\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = file_name_check t1_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t2_0 \"s1sdf3.asd\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = file_name_check t2_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t3_0 \"K.dll\"\nfn tc_3 to bool\nres = new uchar 4096 0\nr = file_name_check t3_0 res\nif ne r 3\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 115\nret false\nend\nret true\nend\ntext t4_0 \"MY16FILE3.exe\"\nfn tc_4 to bool\nres = new uchar 4096 0\nr = file_name_check t4_0 res\nif ne r 3\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 115\nret false\nend\nret true\nend\ntext t5_0 \"His12FILE94.exe\"\nfn tc_5 to bool\nres = new uchar 4096 0\nr = file_name_check t5_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t6_0 \"_Y.txt\"\nfn tc_6 to bool\nres = new uchar 4096 0\nr = file_name_check t6_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t7_0 \"?aREYA.exe\"\nfn tc_7 to bool\nres = new uchar 4096 0\nr = file_name_check t7_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t8_0 \"/this_is_valid.dll\"\nfn tc_8 to bool\nres = new uchar 4096 0\nr = file_name_check t8_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t9_0 \"this_is_valid.wow\"\nfn tc_9 to bool\nres = new uchar 4096 0\nr = file_name_check t9_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t10_0 \"this_is_valid.txt\"\nfn tc_10 to bool\nres = new uchar 4096 0\nr = file_name_check t10_0 res\nif ne r 3\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 115\nret false\nend\nret true\nend\ntext t11_0 \"this_is_valid.txtexe\"\nfn tc_11 to bool\nres = new uchar 4096 0\nr = file_name_check t11_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t12_0 \"#this2_i4s_5valid.ten\"\nfn tc_12 to bool\nres = new uchar 4096 0\nr = file_name_check t12_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t13_0 \"@this1_is6_valid.exe\"\nfn tc_13 to bool\nres = new uchar 4096 0\nr = file_name_check t13_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t14_0 \"this_is_12valid.6exe4.txt\"\nfn tc_14 to bool\nres = new uchar 4096 0\nr = file_name_check t14_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t15_0 \"all.exe.txt\"\nfn tc_15 to bool\nres = new uchar 4096 0\nr = file_name_check t15_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t16_0 \"I563_No.exe\"\nfn tc_16 to bool\nres = new uchar 4096 0\nr = file_name_check t16_0 res\nif ne r 3\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 115\nret false\nend\nret true\nend\ntext t17_0 \"Is3youfault.txt\"\nfn tc_17 to bool\nres = new uchar 4096 0\nr = file_name_check t17_0 res\nif ne r 3\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 115\nret false\nend\nret true\nend\ntext t18_0 \"no_one#knows.dll\"\nfn tc_18 to bool\nres = new uchar 4096 0\nr = file_name_check t18_0 res\nif ne r 3\nret false\nend\nif ne get res 0 89\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 115\nret false\nend\nret true\nend\ntext t19_0 \"1I563_Yes3.exe\"\nfn tc_19 to bool\nres = new uchar 4096 0\nr = file_name_check t19_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t20_0 \"I563_Yes3.txtt\"\nfn tc_20 to bool\nres = new uchar 4096 0\nr = file_name_check t20_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t21_0 \"final..txt\"\nfn tc_21 to bool\nres = new uchar 4096 0\nr = file_name_check t21_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t22_0 \"final132\"\nfn tc_22 to bool\nres = new uchar 4096 0\nr = file_name_check t22_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t23_0 \"_f4indsartal132.\"\nfn tc_23 to bool\nres = new uchar 4096 0\nr = file_name_check t23_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t24_0 \".txt\"\nfn tc_24 to bool\nres = new uchar 4096 0\nr = file_name_check t24_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext t25_0 \"s.\"\nfn tc_25 to bool\nres = new uchar 4096 0\nr = file_name_check t25_0 res\nif ne r 2\nret false\nend\nif ne get res 0 78\nret false\nend\nif ne get res 1 111\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nif not tc_12\nret 13\nend\nif not tc_13\nret 14\nend\nif not tc_14\nret 15\nend\nif not tc_15\nret 16\nend\nif not tc_16\nret 17\nend\nif not tc_17\nret 18\nend\nif not tc_18\nret 19\nend\nif not tc_19\nret 20\nend\nif not tc_20\nret 21\nend\nif not tc_21\nret 22\nend\nif not tc_22\nret 23\nend\nif not tc_23\nret 24\nend\nif not tc_24\nret 25\nend\nif not tc_25\nret 26\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_142_sum_squares", "language": "om", "prompt": "om2\nnote \"\nnote This function will take an array of integers. For all entries in the array, the function shall square the integer entry if its index is a\nnote multiple of 3 and will cube the integer entry if its index is a multiple of 4 and not a multiple of 3. The function will not\nnote change the entries in the array whose indexes are not a multiple of 3 or 4. The function shall then return the sum of all entries.\nnote Examples:\nnote >>> sum_squares [1, 2, 3]\nnote 6\nnote >>> sum_squares []\nnote 0\nnote >>> sum_squares [-1, -5, 2, -1, -5]\nnote -126\nfn sum_squares lst view long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_142_sum_squares.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = sum_squares a0\nret eq r 6\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 4\nput a0 2 9\nr = sum_squares a0\nret eq r 14\nend\nfn tc_2 to bool\na0 = new long 1 0\nr = sum_squares part a0 0 0\nret eq r 0\nend\nfn tc_3 to bool\na0 = new long 9 0\nput a0 0 1\nput a0 1 1\nput a0 2 1\nput a0 3 1\nput a0 4 1\nput a0 5 1\nput a0 6 1\nput a0 7 1\nput a0 8 1\nr = sum_squares a0\nret eq r 9\nend\nfn tc_4 to bool\na0 = new long 9 0\nput a0 0 -1\nput a0 1 -1\nput a0 2 -1\nput a0 3 -1\nput a0 4 -1\nput a0 5 -1\nput a0 6 -1\nput a0 7 -1\nput a0 8 -1\nr = sum_squares a0\nret eq r -3\nend\nfn tc_5 to bool\na0 = new long 1 0\nput a0 0 0\nr = sum_squares a0\nret eq r 0\nend\nfn tc_6 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -5\nput a0 2 2\nput a0 3 -1\nput a0 4 -5\nr = sum_squares a0\nret eq r -126\nend\nfn tc_7 to bool\na0 = new long 5 0\nput a0 0 -56\nput a0 1 -99\nput a0 2 1\nput a0 3 0\nput a0 4 -2\nr = sum_squares a0\nret eq r 3030\nend\nfn tc_8 to bool\na0 = new long 9 0\nput a0 0 -1\nput a0 1 0\nput a0 2 0\nput a0 3 0\nput a0 4 0\nput a0 5 0\nput a0 6 0\nput a0 7 0\nput a0 8 -1\nr = sum_squares a0\nret eq r 0\nend\nfn tc_9 to bool\na0 = new long 15 0\nput a0 0 -16\nput a0 1 -9\nput a0 2 -2\nput a0 3 36\nput a0 4 36\nput a0 5 26\nput a0 6 -20\nput a0 7 25\nput a0 8 -40\nput a0 9 20\nput a0 10 -4\nput a0 11 12\nput a0 12 -26\nput a0 13 35\nput a0 14 37\nr = sum_squares a0\nret eq r -14196\nend\nfn tc_10 to bool\na0 = new long 20 0\nput a0 0 -1\nput a0 1 -3\nput a0 2 17\nput a0 3 -1\nput a0 4 -15\nput a0 5 13\nput a0 6 -1\nput a0 7 14\nput a0 8 -14\nput a0 9 -12\nput a0 10 -5\nput a0 11 14\nput a0 12 -14\nput a0 13 6\nput a0 14 13\nput a0 15 11\nput a0 16 16\nput a0 17 16\nput a0 18 4\nput a0 19 10\nr = sum_squares a0\nret eq r -1448\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_143_words_in_sentence", "language": "om", "prompt": "om2\nnote You are given a string representing a sentence,\nnote the sentence contains some words separated by a space,\nnote and you have to return a string that contains the words from the original sentence,\nnote whose lengths are prime numbers,\nnote the order of the words in the new string should be the same as the original one.\nnote Example 1:\nnote >>> words_in_sentence \"This is a test\"\nnote \"is\"\nnote Example 2:\nnote >>> words_in_sentence \"lets go for swimming\"\nnote \"go for\"\nnote Constraints:\nnote * 1 <= len(sentence) <= 100\nnote * sentence contains only letters\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn words_in_sentence sentence view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_143_words_in_sentence.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"This is a test\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = words_in_sentence t0_0 res\nif ne r 2\nret false\nend\nif ne get res 0 105\nret false\nend\nif ne get res 1 115\nret false\nend\nret true\nend\ntext t1_0 \"lets go for swimming\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = words_in_sentence t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 103\nret false\nend\nif ne get res 1 111\nret false\nend\nif ne get res 2 32\nret false\nend\nif ne get res 3 102\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 114\nret false\nend\nret true\nend\ntext t2_0 \"there is no place available here\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = words_in_sentence t2_0 res\nif ne r 17\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 104\nret false\nend\nif ne get res 2 101\nret false\nend\nif ne get res 3 114\nret false\nend\nif ne get res 4 101\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 105\nret false\nend\nif ne get res 7 115\nret false\nend\nif ne get res 8 32\nret false\nend\nif ne get res 9 110\nret false\nend\nif ne get res 10 111\nret false\nend\nif ne get res 11 32\nret false\nend\nif ne get res 12 112\nret false\nend\nif ne get res 13 108\nret false\nend\nif ne get res 14 97\nret false\nend\nif ne get res 15 99\nret false\nend\nif ne get res 16 101\nret false\nend\nret true\nend\ntext t3_0 \"Hi I am Hussein\"\nfn tc_3 to bool\nres = new uchar 4096 0\nr = words_in_sentence t3_0 res\nif ne r 13\nret false\nend\nif ne get res 0 72\nret false\nend\nif ne get res 1 105\nret false\nend\nif ne get res 2 32\nret false\nend\nif ne get res 3 97\nret false\nend\nif ne get res 4 109\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 72\nret false\nend\nif ne get res 7 117\nret false\nend\nif ne get res 8 115\nret false\nend\nif ne get res 9 115\nret false\nend\nif ne get res 10 101\nret false\nend\nif ne get res 11 105\nret false\nend\nif ne get res 12 110\nret false\nend\nret true\nend\ntext t4_0 \"go for it\"\nfn tc_4 to bool\nres = new uchar 4096 0\nr = words_in_sentence t4_0 res\nif ne r 9\nret false\nend\nif ne get res 0 103\nret false\nend\nif ne get res 1 111\nret false\nend\nif ne get res 2 32\nret false\nend\nif ne get res 3 102\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 114\nret false\nend\nif ne get res 6 32\nret false\nend\nif ne get res 7 105\nret false\nend\nif ne get res 8 116\nret false\nend\nret true\nend\ntext t5_0 \"here\"\nfn tc_5 to bool\nres = new uchar 4096 0\nr = words_in_sentence t5_0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t6_0 \"here is\"\nfn tc_6 to bool\nres = new uchar 4096 0\nr = words_in_sentence t6_0 res\nif ne r 2\nret false\nend\nif ne get res 0 105\nret false\nend\nif ne get res 1 115\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_144_simplify", "language": "om", "prompt": "om2\nnote Your task is to implement a function that will simplify the expression\nnote x * n. The function returns true if x * n evaluates to a whole number and false\nnote otherwise. Both x and n, are string representation of a fraction, and have the following format,\nnote / where both numerator and denominator are positive whole numbers.\nnote You can assume that x, and n are valid fractions, and do not have zero as denominator.\nnote >>> simplify \"1/5\" \"5/1\"\nnote true\nnote >>> simplify \"1/6\" \"2/1\"\nnote false\nnote >>> simplify \"7/10\" \"10/2\"\nnote false\nfn simplify x view uchar * n view uchar * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_144_simplify.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"1/5\"\ntext t0_1 \"5/1\"\nfn tc_0 to bool\nr = simplify t0_0 t0_1\nret eq r true\nend\ntext t1_0 \"1/6\"\ntext t1_1 \"2/1\"\nfn tc_1 to bool\nr = simplify t1_0 t1_1\nret eq r false\nend\ntext t2_0 \"5/1\"\ntext t2_1 \"3/1\"\nfn tc_2 to bool\nr = simplify t2_0 t2_1\nret eq r true\nend\ntext t3_0 \"7/10\"\ntext t3_1 \"10/2\"\nfn tc_3 to bool\nr = simplify t3_0 t3_1\nret eq r false\nend\ntext t4_0 \"2/10\"\ntext t4_1 \"50/10\"\nfn tc_4 to bool\nr = simplify t4_0 t4_1\nret eq r true\nend\ntext t5_0 \"7/2\"\ntext t5_1 \"4/2\"\nfn tc_5 to bool\nr = simplify t5_0 t5_1\nret eq r true\nend\ntext t6_0 \"11/6\"\ntext t6_1 \"6/1\"\nfn tc_6 to bool\nr = simplify t6_0 t6_1\nret eq r true\nend\ntext t7_0 \"2/3\"\ntext t7_1 \"5/2\"\nfn tc_7 to bool\nr = simplify t7_0 t7_1\nret eq r false\nend\ntext t8_0 \"5/2\"\ntext t8_1 \"3/5\"\nfn tc_8 to bool\nr = simplify t8_0 t8_1\nret eq r false\nend\ntext t9_0 \"2/4\"\ntext t9_1 \"8/4\"\nfn tc_9 to bool\nr = simplify t9_0 t9_1\nret eq r true\nend\ntext t10_0 \"2/4\"\ntext t10_1 \"4/2\"\nfn tc_10 to bool\nr = simplify t10_0 t10_1\nret eq r true\nend\ntext t11_0 \"1/5\"\ntext t11_1 \"5/1\"\nfn tc_11 to bool\nr = simplify t11_0 t11_1\nret eq r true\nend\ntext t12_0 \"1/5\"\ntext t12_1 \"1/5\"\nfn tc_12 to bool\nr = simplify t12_0 t12_1\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nif not tc_12\nret 13\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_145_order_by_points", "language": "om", "prompt": "om2\nnote Write a function which sorts the given array of integers\nnote in ascending order according to the sum of their digits.\nnote Note: if there are several items with similar sum of their digits,\nnote order them based on their index in original array.\nnote For example:\nnote >>> order_by_points [1, 11, -1, -11, -12]\nnote [-1, -11, 1, -12, 11]\nnote >>> order_by_points []\nnote []\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn order_by_points nums view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_145_order_by_points.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 11\nput a0 2 -1\nput a0 3 -11\nput a0 4 -12\nres = new long 4096 0\nr = order_by_points a0 res\nif ne r 5\nret false\nend\nif ne get res 0 -1\nret false\nend\nif ne get res 1 -11\nret false\nend\nif ne get res 2 1\nret false\nend\nif ne get res 3 -12\nret false\nend\nif ne get res 4 11\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 15 0\nput a0 0 1234\nput a0 1 423\nput a0 2 463\nput a0 3 145\nput a0 4 2\nput a0 5 423\nput a0 6 423\nput a0 7 53\nput a0 8 6\nput a0 9 37\nput a0 10 3457\nput a0 11 3\nput a0 12 56\nput a0 13 0\nput a0 14 46\nres = new long 4096 0\nr = order_by_points a0 res\nif ne r 15\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 6\nret false\nend\nif ne get res 4 53\nret false\nend\nif ne get res 5 423\nret false\nend\nif ne get res 6 423\nret false\nend\nif ne get res 7 423\nret false\nend\nif ne get res 8 1234\nret false\nend\nif ne get res 9 145\nret false\nend\nif ne get res 10 37\nret false\nend\nif ne get res 11 46\nret false\nend\nif ne get res 12 56\nret false\nend\nif ne get res 13 463\nret false\nend\nif ne get res 14 3457\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = order_by_points part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -11\nput a0 2 -32\nput a0 3 43\nput a0 4 54\nput a0 5 -98\nput a0 6 2\nput a0 7 -3\nres = new long 4096 0\nr = order_by_points a0 res\nif ne r 8\nret false\nend\nif ne get res 0 -3\nret false\nend\nif ne get res 1 -32\nret false\nend\nif ne get res 2 -98\nret false\nend\nif ne get res 3 -11\nret false\nend\nif ne get res 4 1\nret false\nend\nif ne get res 5 2\nret false\nend\nif ne get res 6 43\nret false\nend\nif ne get res 7 54\nret false\nend\nret true\nend\nfn tc_4 to bool\na0 = new long 11 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nput a0 9 10\nput a0 10 11\nres = new long 4096 0\nr = order_by_points a0 res\nif ne r 11\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 10\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 11\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 4\nret false\nend\nif ne get res 6 5\nret false\nend\nif ne get res 7 6\nret false\nend\nif ne get res 8 7\nret false\nend\nif ne get res 9 8\nret false\nend\nif ne get res 10 9\nret false\nend\nret true\nend\nfn tc_5 to bool\na0 = new long 7 0\nput a0 0 0\nput a0 1 6\nput a0 2 6\nput a0 3 -76\nput a0 4 -21\nput a0 5 23\nput a0 6 4\nres = new long 4096 0\nr = order_by_points a0 res\nif ne r 7\nret false\nend\nif ne get res 0 -76\nret false\nend\nif ne get res 1 -21\nret false\nend\nif ne get res 2 0\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 23\nret false\nend\nif ne get res 5 6\nret false\nend\nif ne get res 6 6\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_146_specialFilter", "language": "om", "prompt": "om2\nnote Write a function that takes an array of numbers as input and returns\nnote the number of elements in the array that are greater than 10 and both\nnote first and last digits of a number are odd (1, 3, 5, 7, 9).\nnote For example:\nnote >>> specialFilter [15, -73, 14, -15]\nnote 1\nnote >>> specialFilter [33, -2, -3, 45, 21, 109]\nnote 2\nfn specialFilter nums view long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_146_specialFilter.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 5\nput a0 1 -2\nput a0 2 1\nput a0 3 -5\nr = specialFilter a0\nret eq r 0\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 15\nput a0 1 -73\nput a0 2 14\nput a0 3 -15\nr = specialFilter a0\nret eq r 1\nend\nfn tc_2 to bool\na0 = new long 6 0\nput a0 0 33\nput a0 1 -2\nput a0 2 -3\nput a0 3 45\nput a0 4 21\nput a0 5 109\nr = specialFilter a0\nret eq r 2\nend\nfn tc_3 to bool\na0 = new long 6 0\nput a0 0 43\nput a0 1 -12\nput a0 2 93\nput a0 3 125\nput a0 4 121\nput a0 5 109\nr = specialFilter a0\nret eq r 4\nend\nfn tc_4 to bool\na0 = new long 6 0\nput a0 0 71\nput a0 1 -2\nput a0 2 -33\nput a0 3 75\nput a0 4 21\nput a0 5 19\nr = specialFilter a0\nret eq r 3\nend\nfn tc_5 to bool\na0 = new long 1 0\nput a0 0 1\nr = specialFilter a0\nret eq r 0\nend\nfn tc_6 to bool\na0 = new long 1 0\nr = specialFilter part a0 0 0\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_147_get_max_triples", "language": "om", "prompt": "om2\nnote You are given a positive integer n. You have to create an integer array a of length n.\nnote For each i (1 \u2264 i \u2264 n), the value of a[i] = i * i - i + 1.\nnote Return the number of triples (a[i], a[j], a[k]) of a where i < j < k,\nnote and a[i] + a[j] + a[k] is a multiple of 3.\nnote Example :\nnote >>> get_max_triples 5\nnote 1\nnote Explanation:\nnote a = [1, 3, 7, 13, 21]\nnote The only valid triple is (1, 7, 13).\nfn get_max_triples n long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_147_get_max_triples.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = get_max_triples 5\nret eq r 1\nend\nfn tc_1 to bool\nr = get_max_triples 6\nret eq r 4\nend\nfn tc_2 to bool\nr = get_max_triples 10\nret eq r 36\nend\nfn tc_3 to bool\nr = get_max_triples 100\nret eq r 53361\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_150_x_or_y", "language": "om", "prompt": "om2\nnote A simple program which should return the value of x if n is\nnote a prime number and should return the value of y otherwise.\nnote Examples:\nnote >>> x_or_y 7 34 12\nnote 34\nnote >>> x_or_y 15 8 5\nnote 5\nfn x_or_y n long x long y long to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_150_x_or_y.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = x_or_y 7 34 12\nret eq r 34\nend\nfn tc_1 to bool\nr = x_or_y 15 8 5\nret eq r 5\nend\nfn tc_2 to bool\nr = x_or_y 3 33 5212\nret eq r 33\nend\nfn tc_3 to bool\nr = x_or_y 1259 3 52\nret eq r 3\nend\nfn tc_4 to bool\nr = x_or_y 7919 -1 12\nret eq r -1\nend\nfn tc_5 to bool\nr = x_or_y 3609 1245 583\nret eq r 583\nend\nfn tc_6 to bool\nr = x_or_y 91 56 129\nret eq r 129\nend\nfn tc_7 to bool\nr = x_or_y 6 34 1234\nret eq r 1234\nend\nfn tc_8 to bool\nr = x_or_y 1 2 0\nret eq r 0\nend\nfn tc_9 to bool\nr = x_or_y 2 2 0\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_151_double_the_difference", "language": "om", "prompt": "om2\nnote Given an array of numbers, return the sum of squares of the numbers\nnote in the array that are odd. Ignore numbers that are negative or not integers.\nnote >>> double_the_difference [1, 3, 2, 0]\nnote 10\nnote >>> double_the_difference [-1, -2, 0]\nnote 0\nnote >>> double_the_difference [9, -2]\nnote 81\nnote >>> double_the_difference [0]\nnote 0\nnote If the input array is empty, return 0.\nfn double_the_difference lst view f64 * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_151_double_the_difference.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new f64 1 0.0\nr = double_the_difference part a0 0 0\nret eq r 0\nend\nfn tc_1 to bool\na0 = new f64 2 0.0\nput a0 0 5.0\nput a0 1 4.0\nr = double_the_difference a0\nret eq r 25\nend\nfn tc_2 to bool\na0 = new f64 3 0.0\nput a0 0 0.1\nput a0 1 0.2\nput a0 2 0.3\nr = double_the_difference a0\nret eq r 0\nend\nfn tc_3 to bool\na0 = new f64 3 0.0\nput a0 0 -10.0\nput a0 1 -20.0\nput a0 2 -30.0\nr = double_the_difference a0\nret eq r 0\nend\nfn tc_4 to bool\na0 = new f64 3 0.0\nput a0 0 -1.0\nput a0 1 -2.0\nput a0 2 8.0\nr = double_the_difference a0\nret eq r 0\nend\nfn tc_5 to bool\na0 = new f64 3 0.0\nput a0 0 0.2\nput a0 1 3.0\nput a0 2 5.0\nr = double_the_difference a0\nret eq r 34\nend\nfn tc_6 to bool\na0 = new f64 10 0.0\nput a0 0 -9.0\nput a0 1 -7.0\nput a0 2 -5.0\nput a0 3 -3.0\nput a0 4 -1.0\nput a0 5 1.0\nput a0 6 3.0\nput a0 7 5.0\nput a0 8 7.0\nput a0 9 9.0\nr = double_the_difference a0\nret eq r 165\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_152_compare", "language": "om", "prompt": "om2\nnote I think we all remember that feeling when the result of some long-awaited\nnote event is finally known. The feelings and thoughts you have at that moment are\nnote definitely worth noting down and comparing.\nnote Your task is to determine if a person correctly guessed the results of a number of matches.\nnote You are given two arrays of scores and guesses of equal length, where each index shows a match.\nnote Return an array of the same length denoting how far off each guess was. If they have guessed correctly,\nnote the value is 0, and if not, the value is the absolute difference between the guess and the score.\nnote example:\nnote >>> compare [1, 2, 3, 4, 5, 1] [1, 2, 3, 4, 2, -2]\nnote [0, 0, 0, 0, 3, 3]\nnote >>> compare [0, 5, 0, 0, 0, 4] [4, 1, 1, 0, 0, -2]\nnote [4, 4, 1, 0, 0, 6]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn compare game view long * guess view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_152_compare.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 1\na1 = new long 6 0\nput a1 0 1\nput a1 1 2\nput a1 2 3\nput a1 3 4\nput a1 4 2\nput a1 5 -2\nres = new long 4096 0\nr = compare a0 a1 res\nif ne r 6\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 0\nret false\nend\nif ne get res 2 0\nret false\nend\nif ne get res 3 0\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 3\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 0\nput a0 1 0\nput a0 2 0\nput a0 3 0\nput a0 4 0\nput a0 5 0\na1 = new long 6 0\nput a1 0 0\nput a1 1 0\nput a1 2 0\nput a1 3 0\nput a1 4 0\nput a1 5 0\nres = new long 4096 0\nr = compare a0 a1 res\nif ne r 6\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 0\nret false\nend\nif ne get res 2 0\nret false\nend\nif ne get res 3 0\nret false\nend\nif ne get res 4 0\nret false\nend\nif ne get res 5 0\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\na1 = new long 3 0\nput a1 0 -1\nput a1 1 -2\nput a1 2 -3\nres = new long 4096 0\nr = compare a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 5\na1 = new long 4 0\nput a1 0 -1\nput a1 1 2\nput a1 2 3\nput a1 3 4\nres = new long 4096 0\nr = compare a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 0\nret false\nend\nif ne get res 2 0\nret false\nend\nif ne get res 3 1\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_154_cycpattern_check", "language": "om", "prompt": "om2\nnote You are given 2 words. You need to return true if the second word or any of its rotations is a substring in the first word\nnote >>> cycpattern_check \"abcd\" \"abd\"\nnote false\nnote >>> cycpattern_check \"hello\" \"ell\"\nnote true\nnote >>> cycpattern_check \"whassup\" \"psus\"\nnote false\nnote >>> cycpattern_check \"abab\" \"baa\"\nnote true\nnote >>> cycpattern_check \"efef\" \"eeff\"\nnote false\nnote >>> cycpattern_check \"himenss\" \"simen\"\nnote true\nfn cycpattern_check a view uchar * b view uchar * to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_154_cycpattern_check.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"xyzw\"\ntext t0_1 \"xyw\"\nfn tc_0 to bool\nr = cycpattern_check t0_0 t0_1\nret eq r false\nend\ntext t1_0 \"yello\"\ntext t1_1 \"ell\"\nfn tc_1 to bool\nr = cycpattern_check t1_0 t1_1\nret eq r true\nend\ntext t2_0 \"whattup\"\ntext t2_1 \"ptut\"\nfn tc_2 to bool\nr = cycpattern_check t2_0 t2_1\nret eq r false\nend\ntext t3_0 \"efef\"\ntext t3_1 \"fee\"\nfn tc_3 to bool\nr = cycpattern_check t3_0 t3_1\nret eq r true\nend\ntext t4_0 \"abab\"\ntext t4_1 \"aabb\"\nfn tc_4 to bool\nr = cycpattern_check t4_0 t4_1\nret eq r false\nend\ntext t5_0 \"winemtt\"\ntext t5_1 \"tinem\"\nfn tc_5 to bool\nr = cycpattern_check t5_0 t5_1\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_155_even_odd_count", "language": "om", "prompt": "om2\nnote Given an integer. return an array that has the number of even and odd digits respectively.\nnote Example:\nnote >>> even_odd_count -12\nnote (1, 1)\nnote >>> even_odd_count 123\nnote (1, 2)\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn even_odd_count num long res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_155_even_odd_count.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = even_odd_count 7 res\nif ne r 2\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 1\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = even_odd_count -78 res\nif ne r 2\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 1\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = even_odd_count 3452 res\nif ne r 2\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 2\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new long 4096 0\nr = even_odd_count 346211 res\nif ne r 2\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nret true\nend\nfn tc_4 to bool\nres = new long 4096 0\nr = even_odd_count -345821 res\nif ne r 2\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nret true\nend\nfn tc_5 to bool\nres = new long 4096 0\nr = even_odd_count -2 res\nif ne r 2\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 0\nret false\nend\nret true\nend\nfn tc_6 to bool\nres = new long 4096 0\nr = even_odd_count -45347 res\nif ne r 2\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nret true\nend\nfn tc_7 to bool\nres = new long 4096 0\nr = even_odd_count 0 res\nif ne r 2\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_156_int_to_mini_roman", "language": "om", "prompt": "om2\nnote Given a positive integer, obtain its roman numeral equivalent as a string,\nnote and return it in lowercase.\nnote Restrictions: 1 <= num <= 1000\nnote Examples:\nnote >>> int_to_mini_roman 19\nnote \"xix\"\nnote >>> int_to_mini_roman 152\nnote \"clii\"\nnote >>> int_to_mini_roman 426\nnote \"cdxxvi\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn int_to_mini_roman number long res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_156_int_to_mini_roman.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 19 res\nif ne r 3\nret false\nend\nif ne get res 0 120\nret false\nend\nif ne get res 1 105\nret false\nend\nif ne get res 2 120\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 152 res\nif ne r 4\nret false\nend\nif ne get res 0 99\nret false\nend\nif ne get res 1 108\nret false\nend\nif ne get res 2 105\nret false\nend\nif ne get res 3 105\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 251 res\nif ne r 4\nret false\nend\nif ne get res 0 99\nret false\nend\nif ne get res 1 99\nret false\nend\nif ne get res 2 108\nret false\nend\nif ne get res 3 105\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 426 res\nif ne r 6\nret false\nend\nif ne get res 0 99\nret false\nend\nif ne get res 1 100\nret false\nend\nif ne get res 2 120\nret false\nend\nif ne get res 3 120\nret false\nend\nif ne get res 4 118\nret false\nend\nif ne get res 5 105\nret false\nend\nret true\nend\nfn tc_4 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 500 res\nif ne r 1\nret false\nend\nif ne get res 0 100\nret false\nend\nret true\nend\nfn tc_5 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 1 res\nif ne r 1\nret false\nend\nif ne get res 0 105\nret false\nend\nret true\nend\nfn tc_6 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 4 res\nif ne r 2\nret false\nend\nif ne get res 0 105\nret false\nend\nif ne get res 1 118\nret false\nend\nret true\nend\nfn tc_7 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 43 res\nif ne r 5\nret false\nend\nif ne get res 0 120\nret false\nend\nif ne get res 1 108\nret false\nend\nif ne get res 2 105\nret false\nend\nif ne get res 3 105\nret false\nend\nif ne get res 4 105\nret false\nend\nret true\nend\nfn tc_8 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 90 res\nif ne r 2\nret false\nend\nif ne get res 0 120\nret false\nend\nif ne get res 1 99\nret false\nend\nret true\nend\nfn tc_9 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 94 res\nif ne r 4\nret false\nend\nif ne get res 0 120\nret false\nend\nif ne get res 1 99\nret false\nend\nif ne get res 2 105\nret false\nend\nif ne get res 3 118\nret false\nend\nret true\nend\nfn tc_10 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 532 res\nif ne r 6\nret false\nend\nif ne get res 0 100\nret false\nend\nif ne get res 1 120\nret false\nend\nif ne get res 2 120\nret false\nend\nif ne get res 3 120\nret false\nend\nif ne get res 4 105\nret false\nend\nif ne get res 5 105\nret false\nend\nret true\nend\nfn tc_11 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 900 res\nif ne r 2\nret false\nend\nif ne get res 0 99\nret false\nend\nif ne get res 1 109\nret false\nend\nret true\nend\nfn tc_12 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 994 res\nif ne r 6\nret false\nend\nif ne get res 0 99\nret false\nend\nif ne get res 1 109\nret false\nend\nif ne get res 2 120\nret false\nend\nif ne get res 3 99\nret false\nend\nif ne get res 4 105\nret false\nend\nif ne get res 5 118\nret false\nend\nret true\nend\nfn tc_13 to bool\nres = new uchar 4096 0\nr = int_to_mini_roman 1000 res\nif ne r 1\nret false\nend\nif ne get res 0 109\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nif not tc_11\nret 12\nend\nif not tc_12\nret 13\nend\nif not tc_13\nret 14\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_157_right_angle_triangle", "language": "om", "prompt": "om2\nnote Given the lengths of the three sides of a triangle. Return true if the three\nnote sides form a right-angled triangle, false otherwise.\nnote A right-angled triangle is a triangle in which one angle is right angle or\nnote 90 degree.\nnote Example:\nnote >>> right_angle_triangle 3 4 5\nnote true\nnote >>> right_angle_triangle 1 2 3\nnote false\nfn right_angle_triangle a long b long c long to bool\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_157_right_angle_triangle.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = right_angle_triangle 3 4 5\nret eq r true\nend\nfn tc_1 to bool\nr = right_angle_triangle 1 2 3\nret eq r false\nend\nfn tc_2 to bool\nr = right_angle_triangle 10 6 8\nret eq r true\nend\nfn tc_3 to bool\nr = right_angle_triangle 2 2 2\nret eq r false\nend\nfn tc_4 to bool\nr = right_angle_triangle 7 24 25\nret eq r true\nend\nfn tc_5 to bool\nr = right_angle_triangle 10 5 7\nret eq r false\nend\nfn tc_6 to bool\nr = right_angle_triangle 5 12 13\nret eq r true\nend\nfn tc_7 to bool\nr = right_angle_triangle 15 8 17\nret eq r true\nend\nfn tc_8 to bool\nr = right_angle_triangle 48 55 73\nret eq r true\nend\nfn tc_9 to bool\nr = right_angle_triangle 1 1 1\nret eq r false\nend\nfn tc_10 to bool\nr = right_angle_triangle 2 2 10\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nif not tc_8\nret 9\nend\nif not tc_9\nret 10\nend\nif not tc_10\nret 11\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_159_eat", "language": "om", "prompt": "om2\nnote You're a hungry rabbit, and you already have eaten a certain number of carrots,\nnote but now you need to eat more carrots to complete the day's meals.\nnote you should return an array of [ total number of eaten carrots after your meals,\nnote the number of carrots left after your meals ]\nnote if there are not enough remaining carrots, you will eat all remaining carrots, but will still be hungry.\nnote Example:\nnote >>> eat 5 6 10\nnote [11, 4]\nnote >>> eat 4 8 9\nnote [12, 1]\nnote >>> eat 1 10 10\nnote [11, 0]\nnote >>> eat 2 11 5\nnote [7, 0]\nnote Variables:\nnote @number : integer\nnote the number of carrots that you have eaten.\nnote @need : integer\nnote the number of carrots that you need to eat.\nnote @remaining : integer\nnote the number of remaining carrots thet exist in stock\nnote Constrain:\nnote * 0 <= number <= 1000\nnote * 0 <= need <= 1000\nnote * 0 <= remaining <= 1000\nnote Have fun :)\nnote Omega name: remaining is remainin here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn eat number long need long remainin long res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_159_eat.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = eat 5 6 10 res\nif ne r 2\nret false\nend\nif ne get res 0 11\nret false\nend\nif ne get res 1 4\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = eat 4 8 9 res\nif ne r 2\nret false\nend\nif ne get res 0 12\nret false\nend\nif ne get res 1 1\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = eat 1 10 10 res\nif ne r 2\nret false\nend\nif ne get res 0 11\nret false\nend\nif ne get res 1 0\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new long 4096 0\nr = eat 2 11 5 res\nif ne r 2\nret false\nend\nif ne get res 0 7\nret false\nend\nif ne get res 1 0\nret false\nend\nret true\nend\nfn tc_4 to bool\nres = new long 4096 0\nr = eat 4 5 7 res\nif ne r 2\nret false\nend\nif ne get res 0 9\nret false\nend\nif ne get res 1 2\nret false\nend\nret true\nend\nfn tc_5 to bool\nres = new long 4096 0\nr = eat 4 5 1 res\nif ne r 2\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_161_solve", "language": "om", "prompt": "om2\nnote You are given a string s.\nnote if s[i] is a letter, reverse its case from lower to upper or vise versa,\nnote otherwise keep it as it is.\nnote If the string contains no letters, reverse the string.\nnote The function should return the resulted string.\nnote Examples\nnote >>> solve \"1234\"\nnote \"4321\"\nnote >>> solve \"ab\"\nnote \"AB\"\nnote >>> solve \"#a@C\"\nnote \"#A@c\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn solve s view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_161_solve.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"AsDf\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = solve t0_0 res\nif ne r 4\nret false\nend\nif ne get res 0 97\nret false\nend\nif ne get res 1 83\nret false\nend\nif ne get res 2 100\nret false\nend\nif ne get res 3 70\nret false\nend\nret true\nend\ntext t1_0 \"1234\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = solve t1_0 res\nif ne r 4\nret false\nend\nif ne get res 0 52\nret false\nend\nif ne get res 1 51\nret false\nend\nif ne get res 2 50\nret false\nend\nif ne get res 3 49\nret false\nend\nret true\nend\ntext t2_0 \"ab\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = solve t2_0 res\nif ne r 2\nret false\nend\nif ne get res 0 65\nret false\nend\nif ne get res 1 66\nret false\nend\nret true\nend\ntext t3_0 \"#a@C\"\nfn tc_3 to bool\nres = new uchar 4096 0\nr = solve t3_0 res\nif ne r 4\nret false\nend\nif ne get res 0 35\nret false\nend\nif ne get res 1 65\nret false\nend\nif ne get res 2 64\nret false\nend\nif ne get res 3 99\nret false\nend\nret true\nend\ntext t4_0 \"#AsdfW^45\"\nfn tc_4 to bool\nres = new uchar 4096 0\nr = solve t4_0 res\nif ne r 9\nret false\nend\nif ne get res 0 35\nret false\nend\nif ne get res 1 97\nret false\nend\nif ne get res 2 83\nret false\nend\nif ne get res 3 68\nret false\nend\nif ne get res 4 70\nret false\nend\nif ne get res 5 119\nret false\nend\nif ne get res 6 94\nret false\nend\nif ne get res 7 52\nret false\nend\nif ne get res 8 53\nret false\nend\nret true\nend\ntext t5_0 \"#6@2\"\nfn tc_5 to bool\nres = new uchar 4096 0\nr = solve t5_0 res\nif ne r 4\nret false\nend\nif ne get res 0 50\nret false\nend\nif ne get res 1 64\nret false\nend\nif ne get res 2 54\nret false\nend\nif ne get res 3 35\nret false\nend\nret true\nend\ntext t6_0 \"#$a^D\"\nfn tc_6 to bool\nres = new uchar 4096 0\nr = solve t6_0 res\nif ne r 5\nret false\nend\nif ne get res 0 35\nret false\nend\nif ne get res 1 36\nret false\nend\nif ne get res 2 65\nret false\nend\nif ne get res 3 94\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext t7_0 \"#ccc\"\nfn tc_7 to bool\nres = new uchar 4096 0\nr = solve t7_0 res\nif ne r 4\nret false\nend\nif ne get res 0 35\nret false\nend\nif ne get res 1 67\nret false\nend\nif ne get res 2 67\nret false\nend\nif ne get res 3 67\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nif not tc_7\nret 8\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "HumanEval_163_generate_integers", "language": "om", "prompt": "om2\nnote Given two positive integers a and b, return the even digits between a\nnote and b, in ascending order.\nnote For example:\nnote >>> generate_integers 2 8\nnote [2, 4, 6, 8]\nnote >>> generate_integers 8 2\nnote [2, 4, 6, 8]\nnote >>> generate_integers 10 14\nnote []\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn generate_integers a long b long res edit long * to long\n", "doctests": "transform", "original": "datasets/originals-with-cleaned-doctests/HumanEval_163_generate_integers.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = generate_integers 2 10 res\nif ne r 4\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 8\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = generate_integers 10 2 res\nif ne r 4\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 8\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = generate_integers 132 2 res\nif ne r 4\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 8\nret false\nend\nret true\nend\nfn tc_3 to bool\nres = new long 4096 0\nr = generate_integers 17 89 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} diff --git a/bench/prompts/mbpp-om.coverage.json b/bench/prompts/mbpp-om.coverage.json new file mode 100644 index 0000000..5779f33 --- /dev/null +++ b/bench/prompts/mbpp-om.coverage.json @@ -0,0 +1,2155 @@ +{ + "benchmark": "mbpp", + "originals": "datasets/mbpp-typed", + "multipl_e_commit": "3025a531af7450e7df8b96fe0440e9804480bbad", + "omega_mv_pin": "e5b32567a7aff3ce594e3254a622a846a6cd190b", + "doctests": "transform", + "prompt_terminology": "reworded", + "upstream_size": null, + "originals_count": 400, + "translated": 272, + "refused": 128, + "reasons": { + "type:List[compound]": 67, + "type:List[str]": 22, + "type:Tuple[mixed]": 11, + "type:Dict": 10, + "type:Optional": 6, + "abi:parameter slots": 5, + "type:Any": 2, + "type:Union": 2, + "value:int outside i64": 1, + "type:List[bool]": 1, + "type:Set": 1 + }, + "problems": [ + { + "name": "mbpp_3_is_not_prime", + "translated": true, + "cases": 4 + }, + { + "name": "mbpp_4_heap_queue_largest", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_6_differ_At_One_Bit_Pos", + "translated": true, + "cases": 6 + }, + { + "name": "mbpp_8_square_nums", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_9_find_Rotations", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_11_remove_Occ", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_12_sort_matrix", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_14_find_Volume", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_16_text_lowercase_underscore", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_17_square_perimeter", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_18_remove_dirty_chars", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_19_test_duplicate", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_20_is_woodall", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_56_checks", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_57_find_Max_Num", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_58_opposite_Signs", + "translated": true, + "cases": 4 + }, + { + "name": "mbpp_59_is_octagonal", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_61_count_Substrings", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_62_smallest_num", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_63_max_difference", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[int, int]]" + }, + { + "name": "mbpp_64_subject_marks", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[str, int]]" + }, + { + "name": "mbpp_65_recursive_list_sum", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Union[int, List[int]]]" + }, + { + "name": "mbpp_66_pos_count", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_67_bell_number", + "translated": false, + "reason": "value:int outside i64", + "detail": "6775685320645824322581483068371419745979053216268760300" + }, + { + "name": "mbpp_68_is_Monotonic", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_69_is_sublist", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_70_get_equal", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_71_comb_sort", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_72_dif_Square", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_74_is_samepatterns", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_75_find_tuples", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[int, int, int]]" + }, + { + "name": "mbpp_77_is_Diff", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_79_word_len", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_80_tetrahedral_number", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_83_get_Char", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_84_sequence", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_86_centered_hexagonal_number", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_87_merge_dictionaries_three", + "translated": false, + "reason": "type:Dict", + "detail": "Dict[str, str]" + }, + { + "name": "mbpp_88_freq_count", + "translated": false, + "reason": "type:Dict", + "detail": "Dict[int, int]" + }, + { + "name": "mbpp_89_closest_num", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_90_len_log", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_91_find_substring", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_92_is_undulating", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_93_power", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_94_index_minimum", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[str, int]]" + }, + { + "name": "mbpp_95_Find_Min_Length", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_96_divisor", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_97_frequency_lists", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_99_decimal_to_binary", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_100_next_smallest_palindrome", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_101_kth_element", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_102_snake_to_camel", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_103_eulerian_num", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_104_sort_sublists", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[str]]" + }, + { + "name": "mbpp_105_count", + "translated": false, + "reason": "type:List[bool]", + "detail": "omc refuses bool arrays (new bool N, error 9)" + }, + { + "name": "mbpp_106_add_lists", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_108_merge_sorted_list", + "translated": false, + "reason": "abi:parameter slots", + "detail": "8 > 6" + }, + { + "name": "mbpp_109_odd_Equivalent", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_113_check_integer", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_115_empty_dit", + "translated": false, + "reason": "type:Any", + "detail": "Any" + }, + { + "name": "mbpp_116_tuple_to_int", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_117_list_to_float", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[str, str]]" + }, + { + "name": "mbpp_118_string_to_list", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_119_search", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_120_max_product_tuple", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[int, int]]" + }, + { + "name": "mbpp_123_amicable_numbers_sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_125_find_length", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_126_sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_127_multiply_int", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_128_long_words", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_129_magic_square_test", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_130_max_occurrences", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_131_reverse_vowels", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_132_tup_string", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_133_sum_negativenum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_135_hexagonal_num", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_138_is_Sum_Of_Powers_Of_Two", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_141_pancake_sort", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_142_count_samepair", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_143_find_lists", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Any]" + }, + { + "name": "mbpp_145_max_Abs_Diff", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_160_find_solution", + "translated": false, + "reason": "type:Optional", + "detail": "Optional[Tuple[int, int]]" + }, + { + "name": "mbpp_161_remove_elements", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_162_sum_series", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_164_are_equivalent", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_165_count_char_position", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_166_find_even_pair", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_167_next_power_of_2", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_168_frequency", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_170_sum_range_list", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_171_perimeter_pentagon", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_172_count_occurance", + "translated": true, + "cases": 5 + }, + { + "name": "mbpp_222_check_type", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[Any, ...]" + }, + { + "name": "mbpp_223_is_majority", + "translated": true, + "cases": 4 + }, + { + "name": "mbpp_224_count_Set_Bits", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_226_odd_values_string", + "translated": true, + "cases": 4 + }, + { + "name": "mbpp_227_min_of_three", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_228_all_Bits_Set_In_The_Given_Range", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_229_re_arrange_array", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_230_replace_blank", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_234_volume_cube", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_237_check_occurences", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[int, int]]" + }, + { + "name": "mbpp_238_number_of_substrings", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_239_get_total_number_of_sequences", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_240_replace_list", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Any]" + }, + { + "name": "mbpp_242_count_charac", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_244_next_Perfect_Square", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_245_max_sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_247_lps", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_249_intersection_array", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_250_count_X", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_251_insert_element", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_252_convert", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_253_count_integer", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Union[int, str, float]]" + }, + { + "name": "mbpp_255_combinations_colors", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_256_count_Primes_nums", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_257_swap_numbers", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_259_maximize_elements", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_260_newman_prime", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_261_division_elements", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_262_split_two_parts", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Any]" + }, + { + "name": "mbpp_264_dog_age", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_265_list_split", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Any]" + }, + { + "name": "mbpp_266_lateralsurface_cube", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_267_square_Sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_268_find_star_num", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_269_ascii_value", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_270_sum_even_and_even_index", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_271_even_Power_Sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_272_rear_extract", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[int, str, int]]" + }, + { + "name": "mbpp_273_substract_elements", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_274_even_binomial_Coeff_Sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_277_dict_filter", + "translated": false, + "reason": "type:Dict", + "detail": "Dict[str, int]" + }, + { + "name": "mbpp_278_count_first_elements", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Union[int, Tuple[int, int]]]" + }, + { + "name": "mbpp_279_is_num_decagonal", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_280_sequential_search", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[bool, int]" + }, + { + "name": "mbpp_281_all_unique", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_282_sub_list", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_283_validate", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_284_check_element", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Any]" + }, + { + "name": "mbpp_285_text_match_two_three", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_286_max_sub_array_sum_repeated", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_287_square_Sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_290_max_length", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_291_count_no_of_ways", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_292_find", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_293_otherside_rightangle", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_294_max_val", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Union[str, int]]" + }, + { + "name": "mbpp_295_sum_div", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_296_get_Inv_Count", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_297_flatten_list", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Union[int, List[int]]]" + }, + { + "name": "mbpp_299_max_aggregate", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[str, int]]" + }, + { + "name": "mbpp_304_find_Element", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_305_start_withp", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_306_max_sum_increasing_subseq", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_308_large_product", + "translated": false, + "reason": "abi:parameter slots", + "detail": "7 > 6" + }, + { + "name": "mbpp_309_maximum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_310_string_to_tuple", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_388_highest_Power_of_2", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_389_find_lucas", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_390_add_string", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Any]" + }, + { + "name": "mbpp_391_convert_list_dictionary", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_392_get_max_sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_393_max_length_list", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_394_check_distinct", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_395_first_non_repeating_character", + "translated": false, + "reason": "type:Optional", + "detail": "Optional[str]" + }, + { + "name": "mbpp_396_check_char", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_397_median_numbers", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_398_sum_of_digits", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Any]" + }, + { + "name": "mbpp_399_bitwise_xor", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_400_extract_freq", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[int, int]]" + }, + { + "name": "mbpp_401_add_nested_tuples", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_404_minimum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_405_check_tuplex", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Union[str, int]]" + }, + { + "name": "mbpp_406_find_Parity", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_407_rearrange_bigger", + "translated": false, + "reason": "type:Union", + "detail": "Union[int, bool]" + }, + { + "name": "mbpp_408_k_smallest_pairs", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_409_min_product_tuple", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[int, int]]" + }, + { + "name": "mbpp_410_min_val", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Union[str, int]]" + }, + { + "name": "mbpp_411_snake_to_camel", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_412_remove_odd", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_413_extract_nth_element", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[str, int, int]]" + }, + { + "name": "mbpp_414_overlapping", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_415_max_Product", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_417_group_tuples", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[str]]" + }, + { + "name": "mbpp_418_Find_Max", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[Any]]" + }, + { + "name": "mbpp_419_round_and_sum", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Union[float, int]]" + }, + { + "name": "mbpp_420_cube_Sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_421_concatenate_tuple", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[str, str, int, str]" + }, + { + "name": "mbpp_422_find_Average_Of_Cube", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_424_extract_rear", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[str, str, str]" + }, + { + "name": "mbpp_425_count_element_in_list", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[Any]]" + }, + { + "name": "mbpp_426_filter_oddnumbers", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_427_change_date_format", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_428_shell_sort", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_429_and_tuples", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_430_parabola_directrix", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_431_common_element", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Any]" + }, + { + "name": "mbpp_432_median_trapezium", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_433_check_greater", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_434_text_match_one", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_435_last_Digit", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_436_neg_nos", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_437_remove_odd", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_438_count_bidirectional", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[int, int]]" + }, + { + "name": "mbpp_439_multiple_to_single", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_440_find_adverb_position", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[int, int, str]" + }, + { + "name": "mbpp_441_surfacearea_cube", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_442_positive_count", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_443_largest_neg", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_444_trim_tuple", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_445_index_multiplication", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_446_count_Occurrence", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[Any, ...]" + }, + { + "name": "mbpp_447_cube_nums", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_448_cal_sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_450_extract_string", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_451_remove_whitespaces", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_452_loss_amount", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_453_sumofFactors", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_454_text_match_wordz", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_455_check_monthnumb_number", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_456_reverse_string_list", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_457_Find_Min", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[Any]]" + }, + { + "name": "mbpp_458_rectangle_area", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_459_remove_uppercase", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_460_Extract", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_461_upper_ctr", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_462_combinations_list", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_463_max_subarray_product", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_464_check_value", + "translated": false, + "reason": "type:Dict", + "detail": "Dict[str, int]" + }, + { + "name": "mbpp_465_drop_empty", + "translated": false, + "reason": "type:Dict", + "detail": "Dict[str, Optional[str]]" + }, + { + "name": "mbpp_468_max_product", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_470_add_pairwise", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_471_find_remainder", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_472_check_Consecutive", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_473_tuple_intersection", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[int, int]]" + }, + { + "name": "mbpp_474_replace_char", + "translated": false, + "reason": "abi:parameter slots", + "detail": "8 > 6" + }, + { + "name": "mbpp_475_sort_counter", + "translated": false, + "reason": "type:Dict", + "detail": "Dict[str, int]" + }, + { + "name": "mbpp_476_big_sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_477_is_lower", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_478_remove_lowercase", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_479_first_Digit", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_554_Split", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_555_difference", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_556_find_Odd_Pair", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_557_toggle_string", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_558_digit_distance_nums", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_559_max_sub_array_sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_560_union_elements", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_562_Find_Max_Length", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_563_extract_values", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_564_count_Pairs", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_565_split", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_566_sum_digits", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_567_issort_list", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_568_empty_list", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Dict[None, None]]" + }, + { + "name": "mbpp_569_sort_sublists", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[str]]" + }, + { + "name": "mbpp_572_two_unique_nums", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_573_unique_product", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_574_surfacearea_cylinder", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_576_is_Sub_Array", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_577_last_Digit_Factorial", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_578_interleave_lists", + "translated": false, + "reason": "abi:parameter slots", + "detail": "8 > 6" + }, + { + "name": "mbpp_579_find_dissimilar", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_580_extract_even", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[int, int, Tuple[int, int, Tuple[int, int]], int, int]" + }, + { + "name": "mbpp_581_surface_Area", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_582_my_dict", + "translated": false, + "reason": "type:Set", + "detail": "Set[int]" + }, + { + "name": "mbpp_583_catalan_number", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_584_find_adverbs", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_585_expensive_items", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Dict[str, Union[str, float]]]" + }, + { + "name": "mbpp_586_split_Arr", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_587_list_tuple", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[int, ...]" + }, + { + "name": "mbpp_588_big_diff", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_589_perfect_squares", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_591_swap_List", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_592_sum_Of_product", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_593_removezero_ip", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_594_diff_even_odd", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_595_min_Swaps", + "translated": false, + "reason": "type:Union", + "detail": "Union[int, Literal['Not Possible']]" + }, + { + "name": "mbpp_597_find_kth", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_598_armstrong_number", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_599_sum_average", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[int, float]" + }, + { + "name": "mbpp_600_is_Even", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_602_first_repeated_char", + "translated": false, + "reason": "type:Optional", + "detail": "Optional[str]" + }, + { + "name": "mbpp_603_get_ludic", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_604_reverse_words", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_605_prime_num", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_606_radian_degree", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_607_find_literals", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[str, int, int]" + }, + { + "name": "mbpp_608_bell_Number", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_610_remove_kth_element", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_611_max_of_nth", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_612_merge", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[Any]]" + }, + { + "name": "mbpp_614_cummulative_sum", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_615_average_tuple", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_616_tuple_modulo", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_617_min_Jumps", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_618_div_list", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_619_move_num", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_622_get_median", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_623_nth_nums", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_624_is_upper", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_625_swap_List", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_626_triangle_area", + "translated": false, + "reason": "type:Optional", + "detail": "Optional[int]" + }, + { + "name": "mbpp_627_find_First_Missing", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_628_replace_spaces", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_629_Split", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_630_get_coordinates", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_631_replace_spaces", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_632_move_zero", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_633_pair_xor_Sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_635_heap_sort", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_637_noprofit_noloss", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_638_wind_chill", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_639_sample_nam", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_640_remove_parenthesis", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_641_is_nonagonal", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_643_text_match_wordz_middle", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_644_reverse_Array_Upto_K", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_720_add_dict_to_tuple", + "translated": false, + "reason": "type:Dict", + "detail": "Dict[str, int]" + }, + { + "name": "mbpp_721_maxAverageOfPath", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_722_filter_data", + "translated": false, + "reason": "type:Dict", + "detail": "Dict[str, Tuple[float, int]]" + }, + { + "name": "mbpp_723_count_same_pair", + "translated": true, + "cases": 4 + }, + { + "name": "mbpp_724_power_base_sum", + "translated": true, + "cases": 4 + }, + { + "name": "mbpp_725_extract_quotation", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_726_multiply_elements", + "translated": true, + "cases": 4 + }, + { + "name": "mbpp_728_sum_list", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_730_consecutive_duplicates", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Any]" + }, + { + "name": "mbpp_731_lateralsurface_cone", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_732_replace_specialchar", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_733_find_first_occurrence", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_734_sum_Of_Subarray_Prod", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_735_toggle_middle_bits", + "translated": true, + "cases": 5 + }, + { + "name": "mbpp_736_left_insertion", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_737_check_str", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_738_geometric_sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_739_find_Index", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_740_tuple_to_dict", + "translated": false, + "reason": "type:Dict", + "detail": "Dict[int, int]" + }, + { + "name": "mbpp_741_all_Characters_Same", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_742_area_tetrahedron", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_743_rotate_right", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_744_check_none", + "translated": false, + "reason": "type:Tuple[mixed]", + "detail": "Tuple[Any, ...]" + }, + { + "name": "mbpp_745_divisible_by_digits", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_746_sector_area", + "translated": false, + "reason": "type:Optional", + "detail": "Optional[float]" + }, + { + "name": "mbpp_747_lcs_of_three", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_748_capital_words_spaces", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_749_sort_numeric_strings", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_750_add_tuple", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_751_check_min_heap", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_752_jacobsthal_num", + "translated": true, + "cases": 4 + }, + { + "name": "mbpp_753_min_k", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[str, int]]" + }, + { + "name": "mbpp_754_extract_index_list", + "translated": false, + "reason": "abi:parameter slots", + "detail": "8 > 6" + }, + { + "name": "mbpp_755_second_smallest", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Union[int, float]]" + }, + { + "name": "mbpp_756_text_match_zero_one", + "translated": true, + "cases": 6 + }, + { + "name": "mbpp_757_count_reverse_pairs", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_759_is_decimal", + "translated": true, + "cases": 5 + }, + { + "name": "mbpp_760_unique_Element", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_762_check_monthnumber_number", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_763_find_min_diff", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_764_number_ctr", + "translated": true, + "cases": 4 + }, + { + "name": "mbpp_765_is_polite", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_766_pair_wise", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[int, int]]" + }, + { + "name": "mbpp_767_get_pairs_count", + "translated": true, + "cases": 4 + }, + { + "name": "mbpp_769_Diff", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_770_odd_num_sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_771_check_expression", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_772_remove_length", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_773_occurance_substring", + "translated": false, + "reason": "type:Optional", + "detail": "Optional[Tuple[str, int, int]]" + }, + { + "name": "mbpp_775_odd_position", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_776_count_vowels", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_777_find_sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_778_pack_consecutive_duplicates", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Any]" + }, + { + "name": "mbpp_780_find_combinations", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[Tuple[int, int]]" + }, + { + "name": "mbpp_781_count_divisors", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_782_odd_length_sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_783_rgb_to_hsv", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_784_mul_even_odd", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_785_tuple_str_int", + "translated": true, + "cases": 4 + }, + { + "name": "mbpp_786_right_insertion", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_787_text_match_three", + "translated": true, + "cases": 4 + }, + { + "name": "mbpp_788_new_tuple", + "translated": false, + "reason": "type:List[str]", + "detail": "OM-2 has no array-of-strings type" + }, + { + "name": "mbpp_790_even_position", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_791_remove_nested", + "translated": false, + "reason": "type:Any", + "detail": "Any" + }, + { + "name": "mbpp_792_count_list", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_793_last", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_794_text_starta_endb", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_796_return_sum", + "translated": false, + "reason": "type:Dict", + "detail": "Dict[str, int]" + }, + { + "name": "mbpp_797_sum_in_range", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_798__sum", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_799_left_rotate", + "translated": true, + "cases": 7 + }, + { + "name": "mbpp_800_remove_all_spaces", + "translated": true, + "cases": 4 + }, + { + "name": "mbpp_801_test_three_equal", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_802_count_rotation", + "translated": true, + "cases": 5 + }, + { + "name": "mbpp_803_is_perfect_square", + "translated": true, + "cases": 6 + }, + { + "name": "mbpp_804_is_product_even", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_805_max_sum_list", + "translated": false, + "reason": "type:List[compound]", + "detail": "List[List[int]]" + }, + { + "name": "mbpp_806_max_run_uppercase", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_807_first_odd", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_808_check_K", + "translated": true, + "cases": 3 + }, + { + "name": "mbpp_809_check_smaller", + "translated": true, + "cases": 3 + } + ] +} diff --git a/bench/prompts/mbpp-om.jsonl b/bench/prompts/mbpp-om.jsonl new file mode 100644 index 0000000..c666451 --- /dev/null +++ b/bench/prompts/mbpp-om.jsonl @@ -0,0 +1,272 @@ +{"name": "mbpp_3_is_not_prime", "language": "om", "prompt": "om2\nnote Write an Omega function to identify non-prime numbers.\nfn is_not_prime n long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_3_is_not_prime.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_not_prime 2\nret eq r false\nend\nfn tc_1 to bool\nr = is_not_prime 10\nret eq r true\nend\nfn tc_2 to bool\nr = is_not_prime 35\nret eq r true\nend\nfn tc_3 to bool\nr = is_not_prime 37\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_4_heap_queue_largest", "language": "om", "prompt": "om2\nnote Write a function to find the n largest integers from a given array of numbers, returned in descending order.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn heap_queue_largest nums view long * n long res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_4_heap_queue_largest.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 9 0\nput a0 0 25\nput a0 1 35\nput a0 2 22\nput a0 3 85\nput a0 4 14\nput a0 5 65\nput a0 6 75\nput a0 7 22\nput a0 8 58\nres = new long 4096 0\nr = heap_queue_largest a0 3 res\nif ne r 3\nret false\nend\nif ne get res 0 85\nret false\nend\nif ne get res 1 75\nret false\nend\nif ne get res 2 65\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 9 0\nput a0 0 25\nput a0 1 35\nput a0 2 22\nput a0 3 85\nput a0 4 14\nput a0 5 65\nput a0 6 75\nput a0 7 22\nput a0 8 58\nres = new long 4096 0\nr = heap_queue_largest a0 2 res\nif ne r 2\nret false\nend\nif ne get res 0 85\nret false\nend\nif ne get res 1 75\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 9 0\nput a0 0 25\nput a0 1 35\nput a0 2 22\nput a0 3 85\nput a0 4 14\nput a0 5 65\nput a0 6 75\nput a0 7 22\nput a0 8 58\nres = new long 4096 0\nr = heap_queue_largest a0 5 res\nif ne r 5\nret false\nend\nif ne get res 0 85\nret false\nend\nif ne get res 1 75\nret false\nend\nif ne get res 2 65\nret false\nend\nif ne get res 3 58\nret false\nend\nif ne get res 4 35\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_6_differ_At_One_Bit_Pos", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether the two numbers differ at one bit position only or not.\nfn differ_At_One_Bit_Pos a long b long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_6_differ_At_One_Bit_Pos.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = differ_At_One_Bit_Pos 13 9\nret eq r true\nend\nfn tc_1 to bool\nr = differ_At_One_Bit_Pos 15 8\nret eq r false\nend\nfn tc_2 to bool\nr = differ_At_One_Bit_Pos 2 4\nret eq r false\nend\nfn tc_3 to bool\nr = differ_At_One_Bit_Pos 2 3\nret eq r true\nend\nfn tc_4 to bool\nr = differ_At_One_Bit_Pos 5 1\nret eq r true\nend\nfn tc_5 to bool\nr = differ_At_One_Bit_Pos 1 5\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_8_square_nums", "language": "om", "prompt": "om2\nnote Write a function to find squares of individual elements in an array.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn square_nums nums view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_8_square_nums.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nput a0 9 10\nres = new long 4096 0\nr = square_nums a0 res\nif ne r 10\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 9\nret false\nend\nif ne get res 3 16\nret false\nend\nif ne get res 4 25\nret false\nend\nif ne get res 5 36\nret false\nend\nif ne get res 6 49\nret false\nend\nif ne get res 7 64\nret false\nend\nif ne get res 8 81\nret false\nend\nif ne get res 9 100\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 10\nput a0 1 20\nput a0 2 30\nres = new long 4096 0\nr = square_nums a0 res\nif ne r 3\nret false\nend\nif ne get res 0 100\nret false\nend\nif ne get res 1 400\nret false\nend\nif ne get res 2 900\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 12\nput a0 1 15\nres = new long 4096 0\nr = square_nums a0 res\nif ne r 2\nret false\nend\nif ne get res 0 144\nret false\nend\nif ne get res 1 225\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_9_find_Rotations", "language": "om", "prompt": "om2\nnote Write an Omega function to find the minimum number of rotations (greater than 0) required to get the same string.\nfn find_Rotations str view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_9_find_Rotations.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"aaaa\"\nfn tc_0 to bool\nr = find_Rotations t0_0\nret eq r 1\nend\ntext t1_0 \"ab\"\nfn tc_1 to bool\nr = find_Rotations t1_0\nret eq r 2\nend\ntext t2_0 \"abc\"\nfn tc_2 to bool\nr = find_Rotations t2_0\nret eq r 3\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_11_remove_Occ", "language": "om", "prompt": "om2\nnote Write an Omega function to remove first and last occurrence of a given character from the string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn remove_Occ s view uchar * ch view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_11_remove_Occ.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"hello\"\ntext t0_1 \"l\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = remove_Occ t0_0 t0_1 res\nif ne r 3\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 111\nret false\nend\nret true\nend\ntext t1_0 \"abcda\"\ntext t1_1 \"a\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = remove_Occ t1_0 t1_1 res\nif ne r 3\nret false\nend\nif ne get res 0 98\nret false\nend\nif ne get res 1 99\nret false\nend\nif ne get res 2 100\nret false\nend\nret true\nend\ntext t2_0 \"PHP\"\ntext t2_1 \"P\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = remove_Occ t2_0 t2_1 res\nif ne r 1\nret false\nend\nif ne get res 0 72\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_14_find_Volume", "language": "om", "prompt": "om2\nnote Write an Omega function to find the volume of a triangular prism.\nfn find_Volume l long b long h long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_14_find_Volume.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = find_Volume 10 8 6\nret eq r 240\nend\nfn tc_1 to bool\nr = find_Volume 3 2 2\nret eq r 6\nend\nfn tc_2 to bool\nr = find_Volume 1 2 1\nret eq r 1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_16_text_lowercase_underscore", "language": "om", "prompt": "om2\nnote Write a function to that returns true if the input string contains sequences of lowercase letters joined with an underscore and false otherwise.\nnote Omega name: text is text_ here.\nfn text_lowercase_underscore text_ view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_16_text_lowercase_underscore.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"aab_cbbbc\"\nfn tc_0 to bool\nr = text_lowercase_underscore t0_0\nret eq r true\nend\ntext t1_0 \"aab_Abbbc\"\nfn tc_1 to bool\nr = text_lowercase_underscore t1_0\nret eq r false\nend\ntext t2_0 \"Aaab_abbbc\"\nfn tc_2 to bool\nr = text_lowercase_underscore t2_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_17_square_perimeter", "language": "om", "prompt": "om2\nnote Write a function that returns the perimeter of a square given its side length as input.\nfn square_perimeter a long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_17_square_perimeter.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = square_perimeter 10\nret eq r 40\nend\nfn tc_1 to bool\nr = square_perimeter 5\nret eq r 20\nend\nfn tc_2 to bool\nr = square_perimeter 4\nret eq r 16\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_18_remove_dirty_chars", "language": "om", "prompt": "om2\nnote Write a function to remove characters from the first string which are present in the second string.\nnote Omega name: second_string is second_s here.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn remove_dirty_chars string view uchar * second_s view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_18_remove_dirty_chars.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"probasscurve\"\ntext t0_1 \"pros\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = remove_dirty_chars t0_0 t0_1 res\nif ne r 6\nret false\nend\nif ne get res 0 98\nret false\nend\nif ne get res 1 97\nret false\nend\nif ne get res 2 99\nret false\nend\nif ne get res 3 117\nret false\nend\nif ne get res 4 118\nret false\nend\nif ne get res 5 101\nret false\nend\nret true\nend\ntext t1_0 \"digitalindia\"\ntext t1_1 \"talent\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = remove_dirty_chars t1_0 t1_1 res\nif ne r 7\nret false\nend\nif ne get res 0 100\nret false\nend\nif ne get res 1 105\nret false\nend\nif ne get res 2 103\nret false\nend\nif ne get res 3 105\nret false\nend\nif ne get res 4 105\nret false\nend\nif ne get res 5 100\nret false\nend\nif ne get res 6 105\nret false\nend\nret true\nend\ntext t2_0 \"exoticmiles\"\ntext t2_1 \"toxic\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = remove_dirty_chars t2_0 t2_1 res\nif ne r 5\nret false\nend\nif ne get res 0 101\nret false\nend\nif ne get res 1 109\nret false\nend\nif ne get res 2 108\nret false\nend\nif ne get res 3 101\nret false\nend\nif ne get res 4 115\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_19_test_duplicate", "language": "om", "prompt": "om2\nnote Write a function to find whether a given array of integers contains any duplicate element.\nnote Omega name: arraynums is arraynum here.\nfn test_duplicate arraynum view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_19_test_duplicate.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nr = test_duplicate a0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 4\nr = test_duplicate a0\nret eq r true\nend\nfn tc_2 to bool\na0 = new long 9 0\nput a0 0 1\nput a0 1 1\nput a0 2 2\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 4\nput a0 7 4\nput a0 8 5\nr = test_duplicate a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_20_is_woodall", "language": "om", "prompt": "om2\nnote Write a function to check if the given number is woodball or not.\nfn is_woodall x long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_20_is_woodall.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_woodall 383\nret eq r true\nend\nfn tc_1 to bool\nr = is_woodall 254\nret eq r false\nend\nfn tc_2 to bool\nr = is_woodall 200\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_56_checks", "language": "om", "prompt": "om2\nnote Write an Omega function to check if a given number is one less than twice its reverse.\nfn checks n long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_56_checks.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = checks 70\nret eq r false\nend\nfn tc_1 to bool\nr = checks 23\nret eq r false\nend\nfn tc_2 to bool\nr = checks 73\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_57_find_Max_Num", "language": "om", "prompt": "om2\nnote Write an Omega function to find the largest number that can be formed with the given array of digits.\nfn find_Max_Num arr view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_57_find_Max_Num.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = find_Max_Num a0\nret eq r 321\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 5\nput a0 2 6\nput a0 3 1\nr = find_Max_Num a0\nret eq r 6541\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 9\nr = find_Max_Num a0\nret eq r 9321\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_58_opposite_Signs", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether the given two integers have opposite sign or not.\nfn opposite_Signs x long y long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_58_opposite_Signs.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = opposite_Signs 1 -2\nret eq r true\nend\nfn tc_1 to bool\nr = opposite_Signs 3 2\nret eq r false\nend\nfn tc_2 to bool\nr = opposite_Signs -10 -10\nret eq r false\nend\nfn tc_3 to bool\nr = opposite_Signs -2 2\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_59_is_octagonal", "language": "om", "prompt": "om2\nnote Write a function to find the nth octagonal number.\nfn is_octagonal n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_59_is_octagonal.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_octagonal 5\nret eq r 65\nend\nfn tc_1 to bool\nr = is_octagonal 10\nret eq r 280\nend\nfn tc_2 to bool\nr = is_octagonal 15\nret eq r 645\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_61_count_Substrings", "language": "om", "prompt": "om2\nnote Write an Omega function to count the number of substrings with the sum of digits equal to their length.\nfn count_Substrings s view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_61_count_Substrings.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"112112\"\nfn tc_0 to bool\nr = count_Substrings t0_0\nret eq r 6\nend\ntext t1_0 \"111\"\nfn tc_1 to bool\nr = count_Substrings t1_0\nret eq r 6\nend\ntext t2_0 \"1101112\"\nfn tc_2 to bool\nr = count_Substrings t2_0\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_62_smallest_num", "language": "om", "prompt": "om2\nnote Write an Omega function to find smallest number in an array.\nfn smallest_num xs view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_62_smallest_num.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 10\nput a0 1 20\nput a0 2 1\nput a0 3 45\nput a0 4 99\nr = smallest_num a0\nret eq r 1\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = smallest_num a0\nret eq r 1\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 45\nput a0 1 46\nput a0 2 50\nput a0 3 60\nr = smallest_num a0\nret eq r 45\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_66_pos_count", "language": "om", "prompt": "om2\nnote Write an Omega function to count the number of positive numbers in an array.\nfn pos_count list view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_66_pos_count.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 -2\nput a0 2 3\nput a0 3 -4\nr = pos_count a0\nret eq r 2\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 3\nput a0 1 4\nput a0 2 5\nput a0 3 -1\nr = pos_count a0\nret eq r 3\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nr = pos_count a0\nret eq r 4\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_68_is_Monotonic", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether the given array is monotonic or not.\nfn is_Monotonic A view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_68_is_Monotonic.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 6\nput a0 1 5\nput a0 2 4\nput a0 3 4\nr = is_Monotonic a0\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 2\nput a0 3 3\nr = is_Monotonic a0\nret eq r true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 3\nput a0 2 2\nr = is_Monotonic a0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_69_is_sublist", "language": "om", "prompt": "om2\nnote Write a function to check whether an array contains the given sublist or not.\nfn is_sublist l view long * s view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_69_is_sublist.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 2\nput a0 1 4\nput a0 2 3\nput a0 3 5\nput a0 4 7\na1 = new long 2 0\nput a1 0 3\nput a1 1 7\nr = is_sublist a0 a1\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 2\nput a0 1 4\nput a0 2 3\nput a0 3 5\nput a0 4 7\na1 = new long 2 0\nput a1 0 4\nput a1 1 3\nr = is_sublist a0 a1\nret eq r true\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 2\nput a0 1 4\nput a0 2 3\nput a0 3 5\nput a0 4 7\na1 = new long 2 0\nput a1 0 1\nput a1 1 6\nr = is_sublist a0 a1\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_71_comb_sort", "language": "om", "prompt": "om2\nnote Write a function to sort an array of elements.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn comb_sort nums view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_71_comb_sort.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 5\nput a0 1 15\nput a0 2 37\nput a0 3 25\nput a0 4 79\nres = new long 4096 0\nr = comb_sort a0 res\nif ne r 5\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 15\nret false\nend\nif ne get res 2 25\nret false\nend\nif ne get res 3 37\nret false\nend\nif ne get res 4 79\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 41\nput a0 1 32\nput a0 2 15\nput a0 3 19\nput a0 4 22\nres = new long 4096 0\nr = comb_sort a0 res\nif ne r 5\nret false\nend\nif ne get res 0 15\nret false\nend\nif ne get res 1 19\nret false\nend\nif ne get res 2 22\nret false\nend\nif ne get res 3 32\nret false\nend\nif ne get res 4 41\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 99\nput a0 1 15\nput a0 2 13\nput a0 3 47\nres = new long 4096 0\nr = comb_sort a0 res\nif ne r 4\nret false\nend\nif ne get res 0 13\nret false\nend\nif ne get res 1 15\nret false\nend\nif ne get res 2 47\nret false\nend\nif ne get res 3 99\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_72_dif_Square", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether the given number can be represented as the difference of two squares or not.\nfn dif_Square n long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_72_dif_Square.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = dif_Square 5\nret eq r true\nend\nfn tc_1 to bool\nr = dif_Square 10\nret eq r false\nend\nfn tc_2 to bool\nr = dif_Square 15\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_77_is_Diff", "language": "om", "prompt": "om2\nnote Write an Omega function to find whether a number is divisible by 11.\nfn is_Diff n long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_77_is_Diff.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_Diff 12345\nret eq r false\nend\nfn tc_1 to bool\nr = is_Diff 1212112\nret eq r true\nend\nfn tc_2 to bool\nr = is_Diff 1212\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_79_word_len", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether the length of the word is odd or not.\nfn word_len s view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_79_word_len.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"Hadoop\"\nfn tc_0 to bool\nr = word_len t0_0\nret eq r false\nend\ntext t1_0 \"great\"\nfn tc_1 to bool\nr = word_len t1_0\nret eq r true\nend\ntext t2_0 \"structure\"\nfn tc_2 to bool\nr = word_len t2_0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_80_tetrahedral_number", "language": "om", "prompt": "om2\nnote Write a function to find the nth tetrahedral number.\nfn tetrahedral_number n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_80_tetrahedral_number.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = tetrahedral_number 5\nret eq r 35\nend\nfn tc_1 to bool\nr = tetrahedral_number 6\nret eq r 56\nend\nfn tc_2 to bool\nr = tetrahedral_number 7\nret eq r 84\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_83_get_Char", "language": "om", "prompt": "om2\nnote Write an Omega function to find the character made by adding the ASCII value of all the characters of the given string modulo 26.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn get_Char strr view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_83_get_Char.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"abc\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = get_Char t0_0 res\nif ne r 1\nret false\nend\nif ne get res 0 102\nret false\nend\nret true\nend\ntext t1_0 \"gfg\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = get_Char t1_0 res\nif ne r 1\nret false\nend\nif ne get res 0 116\nret false\nend\nret true\nend\ntext t2_0 \"ab\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = get_Char t2_0 res\nif ne r 1\nret false\nend\nif ne get res 0 99\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_84_sequence", "language": "om", "prompt": "om2\nnote Write a function to find the nth number in the newman conway sequence.\nfn sequence n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_84_sequence.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = sequence 10\nret eq r 6\nend\nfn tc_1 to bool\nr = sequence 2\nret eq r 1\nend\nfn tc_2 to bool\nr = sequence 3\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_86_centered_hexagonal_number", "language": "om", "prompt": "om2\nnote Write a function to find nth centered hexagonal number.\nfn centered_hexagonal_number n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_86_centered_hexagonal_number.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = centered_hexagonal_number 10\nret eq r 271\nend\nfn tc_1 to bool\nr = centered_hexagonal_number 2\nret eq r 7\nend\nfn tc_2 to bool\nr = centered_hexagonal_number 9\nret eq r 217\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_89_closest_num", "language": "om", "prompt": "om2\nnote Write a function to find the closest smaller number than n.\nfn closest_num N long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_89_closest_num.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = closest_num 11\nret eq r 10\nend\nfn tc_1 to bool\nr = closest_num 7\nret eq r 6\nend\nfn tc_2 to bool\nr = closest_num 12\nret eq r 11\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_92_is_undulating", "language": "om", "prompt": "om2\nnote Write a function to check whether the given number is undulating or not.\nfn is_undulating n long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_92_is_undulating.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_undulating 1212121\nret eq r true\nend\nfn tc_1 to bool\nr = is_undulating 1991\nret eq r false\nend\nfn tc_2 to bool\nr = is_undulating 121\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_93_power", "language": "om", "prompt": "om2\nnote Write a function to calculate the value of 'a' to the power 'b'.\nfn power a long b long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_93_power.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = power 3 4\nret eq r 81\nend\nfn tc_1 to bool\nr = power 2 3\nret eq r 8\nend\nfn tc_2 to bool\nr = power 5 5\nret eq r 3125\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_96_divisor", "language": "om", "prompt": "om2\nnote Write an Omega function to find the number of divisors of a given integer.\nfn divisor n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_96_divisor.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = divisor 15\nret eq r 4\nend\nfn tc_1 to bool\nr = divisor 12\nret eq r 6\nend\nfn tc_2 to bool\nr = divisor 9\nret eq r 3\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_99_decimal_to_binary", "language": "om", "prompt": "om2\nnote Write a function to convert the given decimal number to its binary equivalent, represented as a string with no leading zeros.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn decimal_to_binary n long res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_99_decimal_to_binary.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new uchar 4096 0\nr = decimal_to_binary 8 res\nif ne r 4\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 48\nret false\nend\nif ne get res 2 48\nret false\nend\nif ne get res 3 48\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new uchar 4096 0\nr = decimal_to_binary 18 res\nif ne r 5\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 48\nret false\nend\nif ne get res 2 48\nret false\nend\nif ne get res 3 49\nret false\nend\nif ne get res 4 48\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new uchar 4096 0\nr = decimal_to_binary 7 res\nif ne r 3\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 49\nret false\nend\nif ne get res 2 49\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_100_next_smallest_palindrome", "language": "om", "prompt": "om2\nnote Write a function to find the next smallest palindrome of a specified integer, returned as an integer.\nfn next_smallest_palindrome num long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_100_next_smallest_palindrome.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = next_smallest_palindrome 99\nret eq r 101\nend\nfn tc_1 to bool\nr = next_smallest_palindrome 1221\nret eq r 1331\nend\nfn tc_2 to bool\nr = next_smallest_palindrome 120\nret eq r 121\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_101_kth_element", "language": "om", "prompt": "om2\nnote Write a function to find the kth element in the given array using 1-based indexing.\nfn kth_element arr view long * k long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_101_kth_element.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 12\nput a0 1 3\nput a0 2 5\nput a0 3 7\nput a0 4 19\nr = kth_element a0 2\nret eq r 3\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 17\nput a0 1 24\nput a0 2 8\nput a0 3 23\nr = kth_element a0 3\nret eq r 8\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 16\nput a0 1 21\nput a0 2 25\nput a0 3 36\nput a0 4 4\nr = kth_element a0 4\nret eq r 36\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_102_snake_to_camel", "language": "om", "prompt": "om2\nnote Write a function to convert a snake case string to camel case string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn snake_to_camel word view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_102_snake_to_camel.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"python_program\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = snake_to_camel t0_0 res\nif ne r 13\nret false\nend\nif ne get res 0 80\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 116\nret false\nend\nif ne get res 3 104\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 110\nret false\nend\nif ne get res 6 80\nret false\nend\nif ne get res 7 114\nret false\nend\nif ne get res 8 111\nret false\nend\nif ne get res 9 103\nret false\nend\nif ne get res 10 114\nret false\nend\nif ne get res 11 97\nret false\nend\nif ne get res 12 109\nret false\nend\nret true\nend\ntext t1_0 \"python_language\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = snake_to_camel t1_0 res\nif ne r 14\nret false\nend\nif ne get res 0 80\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 116\nret false\nend\nif ne get res 3 104\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 110\nret false\nend\nif ne get res 6 76\nret false\nend\nif ne get res 7 97\nret false\nend\nif ne get res 8 110\nret false\nend\nif ne get res 9 103\nret false\nend\nif ne get res 10 117\nret false\nend\nif ne get res 11 97\nret false\nend\nif ne get res 12 103\nret false\nend\nif ne get res 13 101\nret false\nend\nret true\nend\ntext t2_0 \"programming_language\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = snake_to_camel t2_0 res\nif ne r 19\nret false\nend\nif ne get res 0 80\nret false\nend\nif ne get res 1 114\nret false\nend\nif ne get res 2 111\nret false\nend\nif ne get res 3 103\nret false\nend\nif ne get res 4 114\nret false\nend\nif ne get res 5 97\nret false\nend\nif ne get res 6 109\nret false\nend\nif ne get res 7 109\nret false\nend\nif ne get res 8 105\nret false\nend\nif ne get res 9 110\nret false\nend\nif ne get res 10 103\nret false\nend\nif ne get res 11 76\nret false\nend\nif ne get res 12 97\nret false\nend\nif ne get res 13 110\nret false\nend\nif ne get res 14 103\nret false\nend\nif ne get res 15 117\nret false\nend\nif ne get res 16 97\nret false\nend\nif ne get res 17 103\nret false\nend\nif ne get res 18 101\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_103_eulerian_num", "language": "om", "prompt": "om2\nnote Write a function to find the Eulerian number a(n, m).\nfn eulerian_num n long m long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_103_eulerian_num.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = eulerian_num 3 1\nret eq r 4\nend\nfn tc_1 to bool\nr = eulerian_num 4 1\nret eq r 11\nend\nfn tc_2 to bool\nr = eulerian_num 5 3\nret eq r 26\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_106_add_lists", "language": "om", "prompt": "om2\nnote Write a function to append the given array to the given tuples.\nnote Omega name: test_list is test_lis here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn add_lists test_lis view long * test_tup view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_106_add_lists.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 5\nput a0 1 6\nput a0 2 7\na1 = new long 2 0\nput a1 0 9\nput a1 1 10\nres = new long 4096 0\nr = add_lists a0 a1 res\nif ne r 5\nret false\nend\nif ne get res 0 9\nret false\nend\nif ne get res 1 10\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 6\nret false\nend\nif ne get res 4 7\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 6\nput a0 1 7\nput a0 2 8\na1 = new long 2 0\nput a1 0 10\nput a1 1 11\nres = new long 4096 0\nr = add_lists a0 a1 res\nif ne r 5\nret false\nend\nif ne get res 0 10\nret false\nend\nif ne get res 1 11\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 7\nret false\nend\nif ne get res 4 8\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 7\nput a0 1 8\nput a0 2 9\na1 = new long 2 0\nput a1 0 11\nput a1 1 12\nres = new long 4096 0\nr = add_lists a0 a1 res\nif ne r 5\nret false\nend\nif ne get res 0 11\nret false\nend\nif ne get res 1 12\nret false\nend\nif ne get res 2 7\nret false\nend\nif ne get res 3 8\nret false\nend\nif ne get res 4 9\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_109_odd_Equivalent", "language": "om", "prompt": "om2\nnote Write an Omega function to find the number of numbers with an odd value when rotating a binary string the given number of times.\nfn odd_Equivalent s view uchar * n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_109_odd_Equivalent.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"011001\"\nfn tc_0 to bool\nr = odd_Equivalent t0_0 6\nret eq r 3\nend\ntext t1_0 \"11011\"\nfn tc_1 to bool\nr = odd_Equivalent t1_0 5\nret eq r 4\nend\ntext t2_0 \"1010\"\nfn tc_2 to bool\nr = odd_Equivalent t2_0 4\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_113_check_integer", "language": "om", "prompt": "om2\nnote Write a function to check if a string represents an integer or not.\nnote Omega name: text is text_ here.\nfn check_integer text_ view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_113_check_integer.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"python\"\nfn tc_0 to bool\nr = check_integer t0_0\nret eq r false\nend\ntext t1_0 \"1\"\nfn tc_1 to bool\nr = check_integer t1_0\nret eq r true\nend\ntext t2_0 \"12345\"\nfn tc_2 to bool\nr = check_integer t2_0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_116_tuple_to_int", "language": "om", "prompt": "om2\nnote Write a function to convert a given array of positive integers into a single integer.\nfn tuple_to_int nums view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_116_tuple_to_int.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = tuple_to_int a0\nret eq r 123\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 4\nput a0 1 5\nput a0 2 6\nr = tuple_to_int a0\nret eq r 456\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 5\nput a0 1 6\nput a0 2 7\nr = tuple_to_int a0\nret eq r 567\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_119_search", "language": "om", "prompt": "om2\nnote Write an Omega function to find the element that appears only once in a sorted array.\nfn search arr view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_119_search.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 1\nput a0 2 2\nput a0 3 2\nput a0 4 3\nr = search a0\nret eq r 3\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 1\nput a0 1 1\nput a0 2 3\nput a0 3 3\nput a0 4 4\nput a0 5 4\nput a0 6 5\nput a0 7 5\nput a0 8 7\nput a0 9 7\nput a0 10 8\nr = search a0\nret eq r 8\nend\nfn tc_2 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 2\nput a0 2 2\nput a0 3 3\nput a0 4 3\nput a0 5 4\nput a0 6 4\nr = search a0\nret eq r 1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_123_amicable_numbers_sum", "language": "om", "prompt": "om2\nnote Write a function to sum all amicable numbers from 1 to a specified number.\nfn amicable_numbers_sum limit long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_123_amicable_numbers_sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = amicable_numbers_sum 999\nret eq r 504\nend\nfn tc_1 to bool\nr = amicable_numbers_sum 9999\nret eq r 31626\nend\nfn tc_2 to bool\nr = amicable_numbers_sum 99\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_125_find_length", "language": "om", "prompt": "om2\nnote Write a function to find the maximum difference between the number of 0s and number of 1s in any sub-string of the given binary string.\nfn find_length string view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_125_find_length.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"11000010001\"\nfn tc_0 to bool\nr = find_length t0_0\nret eq r 6\nend\ntext t1_0 \"10111\"\nfn tc_1 to bool\nr = find_length t1_0\nret eq r 1\nend\ntext t2_0 \"11011101100101\"\nfn tc_2 to bool\nr = find_length t2_0\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_126_sum", "language": "om", "prompt": "om2\nnote Write an Omega function to find the sum of common divisors of two given numbers.\nfn sum a long b long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_126_sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = sum 10 15\nret eq r 6\nend\nfn tc_1 to bool\nr = sum 100 150\nret eq r 93\nend\nfn tc_2 to bool\nr = sum 4 6\nret eq r 3\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_127_multiply_int", "language": "om", "prompt": "om2\nnote Write a function to multiply two integers.\nfn multiply_int x long y long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_127_multiply_int.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = multiply_int 10 20\nret eq r 200\nend\nfn tc_1 to bool\nr = multiply_int 5 10\nret eq r 50\nend\nfn tc_2 to bool\nr = multiply_int 4 8\nret eq r 32\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_130_max_occurrences", "language": "om", "prompt": "om2\nnote Write a function to find the item with maximum frequency in a given array.\nfn max_occurrences nums view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_130_max_occurrences.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 21 0\nput a0 0 2\nput a0 1 3\nput a0 2 8\nput a0 3 4\nput a0 4 7\nput a0 5 9\nput a0 6 8\nput a0 7 2\nput a0 8 6\nput a0 9 5\nput a0 10 1\nput a0 11 6\nput a0 12 1\nput a0 13 2\nput a0 14 3\nput a0 15 2\nput a0 16 4\nput a0 17 6\nput a0 18 9\nput a0 19 1\nput a0 20 2\nr = max_occurrences a0\nret eq r 2\nend\nfn tc_1 to bool\na0 = new long 16 0\nput a0 0 2\nput a0 1 3\nput a0 2 8\nput a0 3 4\nput a0 4 7\nput a0 5 9\nput a0 6 8\nput a0 7 7\nput a0 8 9\nput a0 9 15\nput a0 10 14\nput a0 11 10\nput a0 12 12\nput a0 13 13\nput a0 14 16\nput a0 15 18\nr = max_occurrences a0\nret eq r 8\nend\nfn tc_2 to bool\na0 = new long 12 0\nput a0 0 10\nput a0 1 20\nput a0 2 20\nput a0 3 30\nput a0 4 40\nput a0 5 90\nput a0 6 80\nput a0 7 50\nput a0 8 30\nput a0 9 20\nput a0 10 50\nput a0 11 10\nr = max_occurrences a0\nret eq r 20\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_131_reverse_vowels", "language": "om", "prompt": "om2\nnote Write an Omega function to reverse only the vowels of a given string (where y is not a vowel).\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn reverse_vowels str1 view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_131_reverse_vowels.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"Python\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = reverse_vowels t0_0 res\nif ne r 6\nret false\nend\nif ne get res 0 80\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 116\nret false\nend\nif ne get res 3 104\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 110\nret false\nend\nret true\nend\ntext t1_0 \"USA\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = reverse_vowels t1_0 res\nif ne r 3\nret false\nend\nif ne get res 0 65\nret false\nend\nif ne get res 1 83\nret false\nend\nif ne get res 2 85\nret false\nend\nret true\nend\ntext t2_0 \"ab\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = reverse_vowels t2_0 res\nif ne r 2\nret false\nend\nif ne get res 0 97\nret false\nend\nif ne get res 1 98\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_133_sum_negativenum", "language": "om", "prompt": "om2\nnote Write a function to calculate the sum of the negative numbers of a given array of numbers.\nfn sum_negativenum nums view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_133_sum_negativenum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 9 0\nput a0 0 2\nput a0 1 4\nput a0 2 -6\nput a0 3 -9\nput a0 4 11\nput a0 5 -12\nput a0 6 14\nput a0 7 -5\nput a0 8 17\nr = sum_negativenum a0\nret eq r -32\nend\nfn tc_1 to bool\na0 = new long 7 0\nput a0 0 10\nput a0 1 15\nput a0 2 -14\nput a0 3 13\nput a0 4 -18\nput a0 5 12\nput a0 6 -20\nr = sum_negativenum a0\nret eq r -52\nend\nfn tc_2 to bool\na0 = new long 10 0\nput a0 0 19\nput a0 1 -65\nput a0 2 57\nput a0 3 39\nput a0 4 152\nput a0 5 -639\nput a0 6 121\nput a0 7 44\nput a0 8 90\nput a0 9 -190\nr = sum_negativenum a0\nret eq r -894\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_135_hexagonal_num", "language": "om", "prompt": "om2\nnote Write a function to find the nth hexagonal number.\nfn hexagonal_num n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_135_hexagonal_num.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = hexagonal_num 10\nret eq r 190\nend\nfn tc_1 to bool\nr = hexagonal_num 5\nret eq r 45\nend\nfn tc_2 to bool\nr = hexagonal_num 7\nret eq r 91\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_138_is_Sum_Of_Powers_Of_Two", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether the given number can be represented as sum of non-zero powers of 2 or not.\nfn is_Sum_Of_Powers_Of_Two n long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_138_is_Sum_Of_Powers_Of_Two.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_Sum_Of_Powers_Of_Two 10\nret eq r true\nend\nfn tc_1 to bool\nr = is_Sum_Of_Powers_Of_Two 7\nret eq r false\nend\nfn tc_2 to bool\nr = is_Sum_Of_Powers_Of_Two 14\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_141_pancake_sort", "language": "om", "prompt": "om2\nnote Write a function to sort an array of elements.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn pancake_sort nums view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_141_pancake_sort.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 15\nput a0 1 79\nput a0 2 25\nput a0 3 38\nput a0 4 69\nres = new long 4096 0\nr = pancake_sort a0 res\nif ne r 5\nret false\nend\nif ne get res 0 15\nret false\nend\nif ne get res 1 25\nret false\nend\nif ne get res 2 38\nret false\nend\nif ne get res 3 69\nret false\nend\nif ne get res 4 79\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 98\nput a0 1 12\nput a0 2 54\nput a0 3 36\nput a0 4 85\nres = new long 4096 0\nr = pancake_sort a0 res\nif ne r 5\nret false\nend\nif ne get res 0 12\nret false\nend\nif ne get res 1 36\nret false\nend\nif ne get res 2 54\nret false\nend\nif ne get res 3 85\nret false\nend\nif ne get res 4 98\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 41\nput a0 1 42\nput a0 2 32\nput a0 3 12\nput a0 4 23\nres = new long 4096 0\nr = pancake_sort a0 res\nif ne r 5\nret false\nend\nif ne get res 0 12\nret false\nend\nif ne get res 1 23\nret false\nend\nif ne get res 2 32\nret false\nend\nif ne get res 3 41\nret false\nend\nif ne get res 4 42\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_142_count_samepair", "language": "om", "prompt": "om2\nnote Write a function to count number items that are identical in the same position of three given lists.\nfn count_samepair list1 view long * list2 view long * list3 view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_142_count_samepair.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\na1 = new long 8 0\nput a1 0 2\nput a1 1 2\nput a1 2 3\nput a1 3 1\nput a1 4 2\nput a1 5 6\nput a1 6 7\nput a1 7 9\na2 = new long 8 0\nput a2 0 2\nput a2 1 1\nput a2 2 3\nput a2 3 1\nput a2 4 2\nput a2 5 6\nput a2 6 7\nput a2 7 9\nr = count_samepair a0 a1 a2\nret eq r 3\nend\nfn tc_1 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\na1 = new long 8 0\nput a1 0 2\nput a1 1 2\nput a1 2 3\nput a1 3 1\nput a1 4 2\nput a1 5 6\nput a1 6 7\nput a1 7 8\na2 = new long 8 0\nput a2 0 2\nput a2 1 1\nput a2 2 3\nput a2 3 1\nput a2 4 2\nput a2 5 6\nput a2 6 7\nput a2 7 8\nr = count_samepair a0 a1 a2\nret eq r 4\nend\nfn tc_2 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 2\nput a0 5 6\nput a0 6 7\nput a0 7 8\na1 = new long 8 0\nput a1 0 2\nput a1 1 2\nput a1 2 3\nput a1 3 1\nput a1 4 2\nput a1 5 6\nput a1 6 7\nput a1 7 8\na2 = new long 8 0\nput a2 0 2\nput a2 1 1\nput a2 2 3\nput a2 3 1\nput a2 4 2\nput a2 5 6\nput a2 6 7\nput a2 7 8\nr = count_samepair a0 a1 a2\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_145_max_Abs_Diff", "language": "om", "prompt": "om2\nnote Write an Omega function to find the maximum difference between any two elements in a given array.\nfn max_Abs_Diff arr view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_145_max_Abs_Diff.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 2\nput a0 1 1\nput a0 2 5\nput a0 3 3\nr = max_Abs_Diff a0\nret eq r 4\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 9\nput a0 1 3\nput a0 2 2\nput a0 3 5\nput a0 4 1\nr = max_Abs_Diff a0\nret eq r 8\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 3\nput a0 1 2\nput a0 2 1\nr = max_Abs_Diff a0\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_161_remove_elements", "language": "om", "prompt": "om2\nnote Write a function to remove all elements from a given array present in another array.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn remove_elements list1 view long * list2 view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_161_remove_elements.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nput a0 9 10\na1 = new long 4 0\nput a1 0 2\nput a1 1 4\nput a1 2 6\nput a1 3 8\nres = new long 4096 0\nr = remove_elements a0 a1 res\nif ne r 6\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 7\nret false\nend\nif ne get res 4 9\nret false\nend\nif ne get res 5 10\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nput a0 9 10\na1 = new long 4 0\nput a1 0 1\nput a1 1 3\nput a1 2 5\nput a1 3 7\nres = new long 4096 0\nr = remove_elements a0 a1 res\nif ne r 6\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 8\nret false\nend\nif ne get res 4 9\nret false\nend\nif ne get res 5 10\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nput a0 9 10\na1 = new long 2 0\nput a1 0 5\nput a1 1 7\nres = new long 4096 0\nr = remove_elements a0 a1 res\nif ne r 8\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 6\nret false\nend\nif ne get res 5 8\nret false\nend\nif ne get res 6 9\nret false\nend\nif ne get res 7 10\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_162_sum_series", "language": "om", "prompt": "om2\nnote Write a function to calculate the sum (n - 2*i) from i=0 to n // 2, for instance n + (n-2) + (n-4)... (until n-x =< 0).\nfn sum_series n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_162_sum_series.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = sum_series 6\nret eq r 12\nend\nfn tc_1 to bool\nr = sum_series 10\nret eq r 30\nend\nfn tc_2 to bool\nr = sum_series 9\nret eq r 25\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_164_are_equivalent", "language": "om", "prompt": "om2\nnote Write a function to determine if the sum of the divisors of two integers are the same.\nfn are_equivalent num1 long num2 long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_164_are_equivalent.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = are_equivalent 36 57\nret eq r false\nend\nfn tc_1 to bool\nr = are_equivalent 2 4\nret eq r false\nend\nfn tc_2 to bool\nr = are_equivalent 23 47\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_165_count_char_position", "language": "om", "prompt": "om2\nnote Write a function to count the number of characters in a string that occur at the same position in the string as in the English alphabet (case insensitive).\nfn count_char_position str1 view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_165_count_char_position.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"xbcefg\"\nfn tc_0 to bool\nr = count_char_position t0_0\nret eq r 2\nend\ntext t1_0 \"ABcED\"\nfn tc_1 to bool\nr = count_char_position t1_0\nret eq r 3\nend\ntext t2_0 \"AbgdeF\"\nfn tc_2 to bool\nr = count_char_position t2_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_166_find_even_pair", "language": "om", "prompt": "om2\nnote Write a function that counts the number of pairs of integers in an array that xor to an even number.\nfn find_even_pair A view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_166_find_even_pair.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 5\nput a0 1 4\nput a0 2 7\nput a0 3 2\nput a0 4 1\nr = find_even_pair a0\nret eq r 4\nend\nfn tc_1 to bool\na0 = new long 7 0\nput a0 0 7\nput a0 1 2\nput a0 2 8\nput a0 3 1\nput a0 4 0\nput a0 5 5\nput a0 6 11\nr = find_even_pair a0\nret eq r 9\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = find_even_pair a0\nret eq r 1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_167_next_power_of_2", "language": "om", "prompt": "om2\nnote Write an Omega function to find the smallest power of 2 greater than or equal to n.\nfn next_power_of_2 n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_167_next_power_of_2.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = next_power_of_2 0\nret eq r 1\nend\nfn tc_1 to bool\nr = next_power_of_2 5\nret eq r 8\nend\nfn tc_2 to bool\nr = next_power_of_2 17\nret eq r 32\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_168_frequency", "language": "om", "prompt": "om2\nnote Write a function to count the number of occurrences of a number in a given array.\nfn frequency a view long * x long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_168_frequency.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = frequency a0 4\nret eq r 0\nend\nfn tc_1 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 2\nput a0 2 2\nput a0 3 3\nput a0 4 3\nput a0 5 3\nput a0 6 4\nr = frequency a0 3\nret eq r 3\nend\nfn tc_2 to bool\na0 = new long 6 0\nput a0 0 0\nput a0 1 1\nput a0 2 2\nput a0 3 3\nput a0 4 1\nput a0 5 2\nr = frequency a0 1\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_170_sum_range_list", "language": "om", "prompt": "om2\nnote Write a function to find the sum of numbers in an array within a range specified by two indices.\nfn sum_range_list list1 view long * m long n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_170_sum_range_list.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 12 0\nput a0 0 2\nput a0 1 1\nput a0 2 5\nput a0 3 6\nput a0 4 8\nput a0 5 3\nput a0 6 4\nput a0 7 9\nput a0 8 10\nput a0 9 11\nput a0 10 8\nput a0 11 12\nr = sum_range_list a0 8 10\nret eq r 29\nend\nfn tc_1 to bool\na0 = new long 12 0\nput a0 0 2\nput a0 1 1\nput a0 2 5\nput a0 3 6\nput a0 4 8\nput a0 5 3\nput a0 6 4\nput a0 7 9\nput a0 8 10\nput a0 9 11\nput a0 10 8\nput a0 11 12\nr = sum_range_list a0 5 7\nret eq r 16\nend\nfn tc_2 to bool\na0 = new long 12 0\nput a0 0 2\nput a0 1 1\nput a0 2 5\nput a0 3 6\nput a0 4 8\nput a0 5 3\nput a0 6 4\nput a0 7 9\nput a0 8 10\nput a0 9 11\nput a0 10 8\nput a0 11 12\nr = sum_range_list a0 7 10\nret eq r 38\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_171_perimeter_pentagon", "language": "om", "prompt": "om2\nnote Write a function to find the perimeter of a regular pentagon from the length of its sides.\nfn perimeter_pentagon a long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_171_perimeter_pentagon.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = perimeter_pentagon 5\nret eq r 25\nend\nfn tc_1 to bool\nr = perimeter_pentagon 10\nret eq r 50\nend\nfn tc_2 to bool\nr = perimeter_pentagon 15\nret eq r 75\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_172_count_occurance", "language": "om", "prompt": "om2\nnote Write a function to count the number of occurence of the string 'std' in a given string.\nfn count_occurance s view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_172_count_occurance.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"letstdlenstdporstd\"\nfn tc_0 to bool\nr = count_occurance t0_0\nret eq r 3\nend\ntext t1_0 \"truststdsolensporsd\"\nfn tc_1 to bool\nr = count_occurance t1_0\nret eq r 1\nend\ntext t2_0 \"makestdsostdworthit\"\nfn tc_2 to bool\nr = count_occurance t2_0\nret eq r 2\nend\ntext t3_0 \"stds\"\nfn tc_3 to bool\nr = count_occurance t3_0\nret eq r 1\nend\nfn tc_4 to bool\na0 = new uchar 1 0\nr = count_occurance part a0 0 0\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_223_is_majority", "language": "om", "prompt": "om2\nnote Write a function that takes in a sorted array, its length (n), and an element and returns whether the element is the majority element in the given sorted array. (The majority element is the element that occurs more than n/2 times.)\nfn is_majority arr view long * n long x long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_223_is_majority.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 3\nput a0 4 3\nput a0 5 3\nput a0 6 10\nr = is_majority a0 7 3\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 1\nput a0 2 2\nput a0 3 4\nput a0 4 4\nput a0 5 4\nput a0 6 6\nput a0 7 6\nr = is_majority a0 8 4\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 1\nput a0 2 1\nput a0 3 2\nput a0 4 2\nr = is_majority a0 5 1\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 1\nput a0 2 2\nput a0 3 2\nr = is_majority a0 5 1\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_224_count_Set_Bits", "language": "om", "prompt": "om2\nnote Write an Omega function to count the number of set bits (binary digits with value 1) in a given number.\nfn count_Set_Bits n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_224_count_Set_Bits.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = count_Set_Bits 2\nret eq r 1\nend\nfn tc_1 to bool\nr = count_Set_Bits 4\nret eq r 1\nend\nfn tc_2 to bool\nr = count_Set_Bits 6\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_226_odd_values_string", "language": "om", "prompt": "om2\nnote Write an Omega function to remove the characters which have odd index values of a given string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn odd_values_string str view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_226_odd_values_string.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"abcdef\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = odd_values_string t0_0 res\nif ne r 3\nret false\nend\nif ne get res 0 97\nret false\nend\nif ne get res 1 99\nret false\nend\nif ne get res 2 101\nret false\nend\nret true\nend\ntext t1_0 \"python\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = odd_values_string t1_0 res\nif ne r 3\nret false\nend\nif ne get res 0 112\nret false\nend\nif ne get res 1 116\nret false\nend\nif ne get res 2 111\nret false\nend\nret true\nend\ntext t2_0 \"data\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = odd_values_string t2_0 res\nif ne r 2\nret false\nend\nif ne get res 0 100\nret false\nend\nif ne get res 1 116\nret false\nend\nret true\nend\ntext t3_0 \"lambs\"\nfn tc_3 to bool\nres = new uchar 4096 0\nr = odd_values_string t3_0 res\nif ne r 3\nret false\nend\nif ne get res 0 108\nret false\nend\nif ne get res 1 109\nret false\nend\nif ne get res 2 115\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_227_min_of_three", "language": "om", "prompt": "om2\nnote Write a function to find minimum of three numbers.\nfn min_of_three a long b long c long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_227_min_of_three.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = min_of_three 10 20 0\nret eq r 0\nend\nfn tc_1 to bool\nr = min_of_three 19 15 18\nret eq r 15\nend\nfn tc_2 to bool\nr = min_of_three -10 -20 -30\nret eq r -30\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_228_all_Bits_Set_In_The_Given_Range", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether all the bits are unset in the given range or not.\nnote Omega name: r is r_ here.\nfn all_Bits_Set_In_The_Given_Range n long l long r_ long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_228_all_Bits_Set_In_The_Given_Range.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = all_Bits_Set_In_The_Given_Range 4 1 2\nret eq r true\nend\nfn tc_1 to bool\nr = all_Bits_Set_In_The_Given_Range 17 2 4\nret eq r true\nend\nfn tc_2 to bool\nr = all_Bits_Set_In_The_Given_Range 39 4 6\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_229_re_arrange_array", "language": "om", "prompt": "om2\nnote Write a function that takes in an array and an integer n, and re-arranges the first n elements of the given array so that all negative elements appear before positive ones, and where the relative order among negative and positive elements is preserved.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn re_arrange_array arr view long * n long res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_229_re_arrange_array.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 9 0\nput a0 0 -1\nput a0 1 2\nput a0 2 -3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 -7\nput a0 7 8\nput a0 8 9\nres = new long 4096 0\nr = re_arrange_array a0 9 res\nif ne r 9\nret false\nend\nif ne get res 0 -1\nret false\nend\nif ne get res 1 -3\nret false\nend\nif ne get res 2 -7\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 5\nret false\nend\nif ne get res 5 6\nret false\nend\nif ne get res 6 2\nret false\nend\nif ne get res 7 8\nret false\nend\nif ne get res 8 9\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 12\nput a0 1 -14\nput a0 2 -26\nput a0 3 13\nput a0 4 15\nres = new long 4096 0\nr = re_arrange_array a0 5 res\nif ne r 5\nret false\nend\nif ne get res 0 -14\nret false\nend\nif ne get res 1 -26\nret false\nend\nif ne get res 2 12\nret false\nend\nif ne get res 3 13\nret false\nend\nif ne get res 4 15\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 7 0\nput a0 0 10\nput a0 1 24\nput a0 2 36\nput a0 3 -42\nput a0 4 -39\nput a0 5 -78\nput a0 6 85\nres = new long 4096 0\nr = re_arrange_array a0 7 res\nif ne r 7\nret false\nend\nif ne get res 0 -42\nret false\nend\nif ne get res 1 -39\nret false\nend\nif ne get res 2 -78\nret false\nend\nif ne get res 3 10\nret false\nend\nif ne get res 4 24\nret false\nend\nif ne get res 5 36\nret false\nend\nif ne get res 6 85\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_230_replace_blank", "language": "om", "prompt": "om2\nnote Write a function that takes in a string and character, replaces blank spaces in the string with the character, and returns the string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn replace_blank str1 view uchar * char view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_230_replace_blank.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"hello people\"\ntext t0_1 \"@\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = replace_blank t0_0 t0_1 res\nif ne r 12\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 108\nret false\nend\nif ne get res 3 108\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 64\nret false\nend\nif ne get res 6 112\nret false\nend\nif ne get res 7 101\nret false\nend\nif ne get res 8 111\nret false\nend\nif ne get res 9 112\nret false\nend\nif ne get res 10 108\nret false\nend\nif ne get res 11 101\nret false\nend\nret true\nend\ntext t1_0 \"python program language\"\ntext t1_1 \"$\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = replace_blank t1_0 t1_1 res\nif ne r 23\nret false\nend\nif ne get res 0 112\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 116\nret false\nend\nif ne get res 3 104\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 110\nret false\nend\nif ne get res 6 36\nret false\nend\nif ne get res 7 112\nret false\nend\nif ne get res 8 114\nret false\nend\nif ne get res 9 111\nret false\nend\nif ne get res 10 103\nret false\nend\nif ne get res 11 114\nret false\nend\nif ne get res 12 97\nret false\nend\nif ne get res 13 109\nret false\nend\nif ne get res 14 36\nret false\nend\nif ne get res 15 108\nret false\nend\nif ne get res 16 97\nret false\nend\nif ne get res 17 110\nret false\nend\nif ne get res 18 103\nret false\nend\nif ne get res 19 117\nret false\nend\nif ne get res 20 97\nret false\nend\nif ne get res 21 103\nret false\nend\nif ne get res 22 101\nret false\nend\nret true\nend\ntext t2_0 \"blank space\"\ntext t2_1 \"-\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = replace_blank t2_0 t2_1 res\nif ne r 11\nret false\nend\nif ne get res 0 98\nret false\nend\nif ne get res 1 108\nret false\nend\nif ne get res 2 97\nret false\nend\nif ne get res 3 110\nret false\nend\nif ne get res 4 107\nret false\nend\nif ne get res 5 45\nret false\nend\nif ne get res 6 115\nret false\nend\nif ne get res 7 112\nret false\nend\nif ne get res 8 97\nret false\nend\nif ne get res 9 99\nret false\nend\nif ne get res 10 101\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_234_volume_cube", "language": "om", "prompt": "om2\nnote Write a function to find the volume of a cube given its side length.\nfn volume_cube l long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_234_volume_cube.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = volume_cube 3\nret eq r 27\nend\nfn tc_1 to bool\nr = volume_cube 2\nret eq r 8\nend\nfn tc_2 to bool\nr = volume_cube 5\nret eq r 125\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_238_number_of_substrings", "language": "om", "prompt": "om2\nnote Write an Omega function to count the number of non-empty substrings of a given string.\nfn number_of_substrings str view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_238_number_of_substrings.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"abc\"\nfn tc_0 to bool\nr = number_of_substrings t0_0\nret eq r 6\nend\ntext t1_0 \"abcd\"\nfn tc_1 to bool\nr = number_of_substrings t1_0\nret eq r 10\nend\ntext t2_0 \"abcde\"\nfn tc_2 to bool\nr = number_of_substrings t2_0\nret eq r 15\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_239_get_total_number_of_sequences", "language": "om", "prompt": "om2\nnote Write a function that takes in positive integers m and n and finds the number of possible sequences of length n, such that each element is a positive integer and is greater than or equal to twice the previous element but less than or equal to m.\nfn get_total_number_of_sequences m long n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_239_get_total_number_of_sequences.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = get_total_number_of_sequences 10 4\nret eq r 4\nend\nfn tc_1 to bool\nr = get_total_number_of_sequences 5 2\nret eq r 6\nend\nfn tc_2 to bool\nr = get_total_number_of_sequences 16 3\nret eq r 84\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_242_count_charac", "language": "om", "prompt": "om2\nnote Write a function to count the total number of characters in a string.\nfn count_charac str1 view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_242_count_charac.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"python programming\"\nfn tc_0 to bool\nr = count_charac t0_0\nret eq r 18\nend\ntext t1_0 \"language\"\nfn tc_1 to bool\nr = count_charac t1_0\nret eq r 8\nend\ntext t2_0 \"words\"\nfn tc_2 to bool\nr = count_charac t2_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_244_next_Perfect_Square", "language": "om", "prompt": "om2\nnote Write an Omega function to find the next perfect square greater than a given number.\nfn next_Perfect_Square N long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_244_next_Perfect_Square.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = next_Perfect_Square 35\nret eq r 36\nend\nfn tc_1 to bool\nr = next_Perfect_Square 6\nret eq r 9\nend\nfn tc_2 to bool\nr = next_Perfect_Square 9\nret eq r 16\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_245_max_sum", "language": "om", "prompt": "om2\nnote Write a function that takes an array and finds the maximum sum of a bitonic subsequence for the given array, where a sequence is bitonic if it is first increasing and then decreasing.\nfn max_sum arr view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_245_max_sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 9 0\nput a0 0 1\nput a0 1 15\nput a0 2 51\nput a0 3 45\nput a0 4 33\nput a0 5 100\nput a0 6 12\nput a0 7 18\nput a0 8 9\nr = max_sum a0\nret eq r 194\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 80\nput a0 1 60\nput a0 2 30\nput a0 3 40\nput a0 4 20\nput a0 5 10\nr = max_sum a0\nret eq r 210\nend\nfn tc_2 to bool\na0 = new long 8 0\nput a0 0 2\nput a0 1 3\nput a0 2 14\nput a0 3 16\nput a0 4 21\nput a0 5 23\nput a0 6 29\nput a0 7 30\nr = max_sum a0\nret eq r 138\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_247_lps", "language": "om", "prompt": "om2\nnote Write a function to find the length of the longest palindromic subsequence in the given string.\nfn lps str view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_247_lps.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"TENS FOR TENS\"\nfn tc_0 to bool\nr = lps t0_0\nret eq r 5\nend\ntext t1_0 \"CARDIO FOR CARDS\"\nfn tc_1 to bool\nr = lps t1_0\nret eq r 7\nend\ntext t2_0 \"PART OF THE JOURNEY IS PART\"\nfn tc_2 to bool\nr = lps t2_0\nret eq r 9\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_249_intersection_array", "language": "om", "prompt": "om2\nnote Write a function to find the intersection of two arrays.\nnote Omega name: array_nums1 is array_nu here.\nnote Omega name: array_nums2 is array_n_ here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn intersection_array array_nu view long * array_n_ view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_249_intersection_array.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 5\nput a0 4 7\nput a0 5 8\nput a0 6 9\nput a0 7 10\na1 = new long 5 0\nput a1 0 1\nput a1 1 2\nput a1 2 4\nput a1 3 8\nput a1 4 9\nres = new long 4096 0\nr = intersection_array a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 8\nret false\nend\nif ne get res 3 9\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 5\nput a0 4 7\nput a0 5 8\nput a0 6 9\nput a0 7 10\na1 = new long 4 0\nput a1 0 3\nput a1 1 5\nput a1 2 7\nput a1 3 9\nres = new long 4096 0\nr = intersection_array a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 7\nret false\nend\nif ne get res 3 9\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 5\nput a0 4 7\nput a0 5 8\nput a0 6 9\nput a0 7 10\na1 = new long 4 0\nput a1 0 10\nput a1 1 20\nput a1 2 30\nput a1 3 40\nres = new long 4096 0\nr = intersection_array a0 a1 res\nif ne r 1\nret false\nend\nif ne get res 0 10\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_250_count_X", "language": "om", "prompt": "om2\nnote Write an Omega function that takes in an array and an element and counts the occcurences of the element in the array.\nfn count_X tup view long * x long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_250_count_X.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 12 0\nput a0 0 10\nput a0 1 8\nput a0 2 5\nput a0 3 2\nput a0 4 10\nput a0 5 15\nput a0 6 10\nput a0 7 8\nput a0 8 5\nput a0 9 8\nput a0 10 8\nput a0 11 2\nr = count_X a0 4\nret eq r 0\nend\nfn tc_1 to bool\na0 = new long 12 0\nput a0 0 10\nput a0 1 8\nput a0 2 5\nput a0 3 2\nput a0 4 10\nput a0 5 15\nput a0 6 10\nput a0 7 8\nput a0 8 5\nput a0 9 8\nput a0 10 8\nput a0 11 2\nr = count_X a0 10\nret eq r 3\nend\nfn tc_2 to bool\na0 = new long 12 0\nput a0 0 10\nput a0 1 8\nput a0 2 5\nput a0 3 2\nput a0 4 10\nput a0 5 15\nput a0 6 10\nput a0 7 8\nput a0 8 5\nput a0 9 8\nput a0 10 8\nput a0 11 2\nr = count_X a0 8\nret eq r 4\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_252_convert", "language": "om", "prompt": "om2\nnote Write an Omega function to convert complex numbers to polar coordinates.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn convert numbers long res edit f64 * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_252_convert.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new f64 4096 0.0\nr = convert 1 res\nif ne r 2\nret false\nend\nif ne get res 0 1.0\nret false\nend\nif ne get res 1 0.0\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new f64 4096 0.0\nr = convert 4 res\nif ne r 2\nret false\nend\nif ne get res 0 4.0\nret false\nend\nif ne get res 1 0.0\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new f64 4096 0.0\nr = convert 5 res\nif ne r 2\nret false\nend\nif ne get res 0 5.0\nret false\nend\nif ne get res 1 0.0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_256_count_Primes_nums", "language": "om", "prompt": "om2\nnote Write an Omega function that takes in a non-negative number and returns the number of prime numbers less than the given non-negative number.\nfn count_Primes_nums n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_256_count_Primes_nums.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = count_Primes_nums 5\nret eq r 2\nend\nfn tc_1 to bool\nr = count_Primes_nums 10\nret eq r 4\nend\nfn tc_2 to bool\nr = count_Primes_nums 100\nret eq r 25\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_257_swap_numbers", "language": "om", "prompt": "om2\nnote Write a function that takes in two numbers and returns an array with the second number and then the first number.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn swap_numbers a long b long res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_257_swap_numbers.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = swap_numbers 10 20 res\nif ne r 2\nret false\nend\nif ne get res 0 20\nret false\nend\nif ne get res 1 10\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = swap_numbers 15 17 res\nif ne r 2\nret false\nend\nif ne get res 0 17\nret false\nend\nif ne get res 1 15\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = swap_numbers 100 200 res\nif ne r 2\nret false\nend\nif ne get res 0 200\nret false\nend\nif ne get res 1 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_260_newman_prime", "language": "om", "prompt": "om2\nnote Write a function to find the nth newman\u2013shanks\u2013williams prime number.\nfn newman_prime n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_260_newman_prime.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = newman_prime 3\nret eq r 7\nend\nfn tc_1 to bool\nr = newman_prime 4\nret eq r 17\nend\nfn tc_2 to bool\nr = newman_prime 5\nret eq r 41\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_261_division_elements", "language": "om", "prompt": "om2\nnote Write a function that takes in two tuples and performs mathematical division operation element-wise across the given tuples.\nnote Omega name: test_tup1 is test_tup here.\nnote Omega name: test_tup2 is test_tu_ here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn division_elements test_tup view long * test_tu_ view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_261_division_elements.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 10\nput a0 1 4\nput a0 2 6\nput a0 3 9\na1 = new long 4 0\nput a1 0 5\nput a1 1 2\nput a1 2 3\nput a1 3 3\nres = new long 4096 0\nr = division_elements a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 12\nput a0 1 6\nput a0 2 8\nput a0 3 16\na1 = new long 4 0\nput a1 0 6\nput a1 1 3\nput a1 2 4\nput a1 3 4\nres = new long 4096 0\nr = division_elements a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 20\nput a0 1 14\nput a0 2 36\nput a0 3 18\na1 = new long 4 0\nput a1 0 5\nput a1 1 7\nput a1 2 6\nput a1 3 9\nres = new long 4096 0\nr = division_elements a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 2\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_264_dog_age", "language": "om", "prompt": "om2\nnote Write a function to calculate a dog's age in dog's years.\nfn dog_age h_age long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_264_dog_age.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = dog_age 12\nret eq r 61\nend\nfn tc_1 to bool\nr = dog_age 15\nret eq r 73\nend\nfn tc_2 to bool\nr = dog_age 24\nret eq r 109\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_266_lateralsurface_cube", "language": "om", "prompt": "om2\nnote Write a function to find the lateral surface area of a cube given its side length.\nfn lateralsurface_cube l long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_266_lateralsurface_cube.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = lateralsurface_cube 5\nret eq r 100\nend\nfn tc_1 to bool\nr = lateralsurface_cube 9\nret eq r 324\nend\nfn tc_2 to bool\nr = lateralsurface_cube 10\nret eq r 400\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_267_square_Sum", "language": "om", "prompt": "om2\nnote Write an Omega function that takes in an integer n and returns the sum of the squares of the first n odd natural numbers.\nfn square_Sum n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_267_square_Sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = square_Sum 2\nret eq r 10\nend\nfn tc_1 to bool\nr = square_Sum 3\nret eq r 35\nend\nfn tc_2 to bool\nr = square_Sum 4\nret eq r 84\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_268_find_star_num", "language": "om", "prompt": "om2\nnote Write a function to find the n'th star number.\nfn find_star_num n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_268_find_star_num.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = find_star_num 3\nret eq r 37\nend\nfn tc_1 to bool\nr = find_star_num 4\nret eq r 73\nend\nfn tc_2 to bool\nr = find_star_num 5\nret eq r 121\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_269_ascii_value", "language": "om", "prompt": "om2\nnote Write a function to find the ascii value of a character.\nfn ascii_value k view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_269_ascii_value.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"A\"\nfn tc_0 to bool\nr = ascii_value t0_0\nret eq r 65\nend\ntext t1_0 \"R\"\nfn tc_1 to bool\nr = ascii_value t1_0\nret eq r 82\nend\ntext t2_0 \"S\"\nfn tc_2 to bool\nr = ascii_value t2_0\nret eq r 83\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_270_sum_even_and_even_index", "language": "om", "prompt": "om2\nnote Write an Omega function to find the sum of even numbers at even positions of an array.\nfn sum_even_and_even_index arr view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_270_sum_even_and_even_index.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 6 0\nput a0 0 5\nput a0 1 6\nput a0 2 12\nput a0 3 1\nput a0 4 18\nput a0 5 8\nr = sum_even_and_even_index a0\nret eq r 30\nend\nfn tc_1 to bool\na0 = new long 10 0\nput a0 0 3\nput a0 1 20\nput a0 2 17\nput a0 3 9\nput a0 4 2\nput a0 5 10\nput a0 6 18\nput a0 7 13\nput a0 8 6\nput a0 9 18\nr = sum_even_and_even_index a0\nret eq r 26\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 5\nput a0 1 6\nput a0 2 12\nput a0 3 1\nr = sum_even_and_even_index a0\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_271_even_Power_Sum", "language": "om", "prompt": "om2\nnote Write an Omega function that takes in an integer n and finds the sum of the first n even natural numbers that are raised to the fifth power.\nfn even_Power_Sum n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_271_even_Power_Sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = even_Power_Sum 2\nret eq r 1056\nend\nfn tc_1 to bool\nr = even_Power_Sum 3\nret eq r 8832\nend\nfn tc_2 to bool\nr = even_Power_Sum 1\nret eq r 32\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_273_substract_elements", "language": "om", "prompt": "om2\nnote Write a function that takes in two tuples and subtracts the elements of the first array by the elements of the second array with the same index.\nnote Omega name: test_tup1 is test_tup here.\nnote Omega name: test_tup2 is test_tu_ here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn substract_elements test_tup view long * test_tu_ view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_273_substract_elements.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 10\nput a0 1 4\nput a0 2 5\na1 = new long 3 0\nput a1 0 2\nput a1 1 5\nput a1 2 18\nres = new long 4096 0\nr = substract_elements a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 8\nret false\nend\nif ne get res 1 -1\nret false\nend\nif ne get res 2 -13\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 11\nput a0 1 2\nput a0 2 3\na1 = new long 3 0\nput a1 0 24\nput a1 1 45\nput a1 2 16\nres = new long 4096 0\nr = substract_elements a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 -13\nret false\nend\nif ne get res 1 -43\nret false\nend\nif ne get res 2 -13\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 7\nput a0 1 18\nput a0 2 9\na1 = new long 3 0\nput a1 0 10\nput a1 1 11\nput a1 2 12\nres = new long 4096 0\nr = substract_elements a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 -3\nret false\nend\nif ne get res 1 7\nret false\nend\nif ne get res 2 -3\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_274_even_binomial_Coeff_Sum", "language": "om", "prompt": "om2\nnote Write an Omega function that takes in a positive integer n and finds the sum of even index binomial coefficients.\nfn even_binomial_Coeff_Sum n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_274_even_binomial_Coeff_Sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = even_binomial_Coeff_Sum 4\nret eq r 8\nend\nfn tc_1 to bool\nr = even_binomial_Coeff_Sum 6\nret eq r 32\nend\nfn tc_2 to bool\nr = even_binomial_Coeff_Sum 2\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_279_is_num_decagonal", "language": "om", "prompt": "om2\nnote Write a function to find the nth decagonal number.\nfn is_num_decagonal n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_279_is_num_decagonal.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_num_decagonal 3\nret eq r 27\nend\nfn tc_1 to bool\nr = is_num_decagonal 7\nret eq r 175\nend\nfn tc_2 to bool\nr = is_num_decagonal 10\nret eq r 370\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_281_all_unique", "language": "om", "prompt": "om2\nnote Write an Omega function to check if the elements of a given array are unique or not.\nnote Omega name: test_list is test_lis here.\nfn all_unique test_lis view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_281_all_unique.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = all_unique a0\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 1\nput a0 3 2\nr = all_unique a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nr = all_unique a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_282_sub_list", "language": "om", "prompt": "om2\nnote Write a function to subtract two lists element-wise.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn sub_list nums1 view long * nums2 view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_282_sub_list.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\na1 = new long 3 0\nput a1 0 4\nput a1 1 5\nput a1 2 6\nres = new long 4096 0\nr = sub_list a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 -3\nret false\nend\nif ne get res 1 -3\nret false\nend\nif ne get res 2 -3\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 2 0\nput a0 0 1\nput a0 1 2\na1 = new long 2 0\nput a1 0 3\nput a1 1 4\nres = new long 4096 0\nr = sub_list a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 -2\nret false\nend\nif ne get res 1 -2\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 90\nput a0 1 120\na1 = new long 2 0\nput a1 0 50\nput a1 1 70\nres = new long 4096 0\nr = sub_list a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 40\nret false\nend\nif ne get res 1 50\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_283_validate", "language": "om", "prompt": "om2\nnote Write an Omega function takes in an integer and check whether the frequency of each digit in the integer is less than or equal to the digit itself.\nfn validate n long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_283_validate.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = validate 1234\nret eq r true\nend\nfn tc_1 to bool\nr = validate 51241\nret eq r false\nend\nfn tc_2 to bool\nr = validate 321\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_285_text_match_two_three", "language": "om", "prompt": "om2\nnote Write a function that checks whether a string contains the 'a' character followed by two or three 'b' characters.\nnote Omega name: text is text_ here.\nfn text_match_two_three text_ view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_285_text_match_two_three.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"ac\"\nfn tc_0 to bool\nr = text_match_two_three t0_0\nret eq r false\nend\ntext t1_0 \"dc\"\nfn tc_1 to bool\nr = text_match_two_three t1_0\nret eq r false\nend\ntext t2_0 \"abbbba\"\nfn tc_2 to bool\nr = text_match_two_three t2_0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_286_max_sub_array_sum_repeated", "language": "om", "prompt": "om2\nnote Write a function to find the largest sum of a contiguous array in the modified array which is formed by repeating the given array k times.\nfn max_sub_array_sum_repeated a view long * n long k long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_286_max_sub_array_sum_repeated.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 10\nput a0 1 20\nput a0 2 -30\nput a0 3 -1\nr = max_sub_array_sum_repeated a0 4 3\nret eq r 30\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 -1\nput a0 1 10\nput a0 2 20\nr = max_sub_array_sum_repeated a0 3 2\nret eq r 59\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 -3\nr = max_sub_array_sum_repeated a0 3 3\nret eq r -1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_287_square_Sum", "language": "om", "prompt": "om2\nnote Write an Omega function takes in an integer n and returns the sum of squares of first n even natural numbers.\nfn square_Sum n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_287_square_Sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = square_Sum 2\nret eq r 20\nend\nfn tc_1 to bool\nr = square_Sum 3\nret eq r 56\nend\nfn tc_2 to bool\nr = square_Sum 4\nret eq r 120\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_291_count_no_of_ways", "language": "om", "prompt": "om2\nnote Write a function to find out the number of ways of painting the fence such that at most 2 adjacent posts have the same color for the given fence with n posts and k colors.\nfn count_no_of_ways n long k long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_291_count_no_of_ways.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = count_no_of_ways 2 4\nret eq r 16\nend\nfn tc_1 to bool\nr = count_no_of_ways 3 2\nret eq r 6\nend\nfn tc_2 to bool\nr = count_no_of_ways 4 4\nret eq r 228\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_292_find", "language": "om", "prompt": "om2\nnote Write an Omega function to find quotient of two numbers (rounded down to the nearest integer).\nfn find n long m long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_292_find.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = find 10 3\nret eq r 3\nend\nfn tc_1 to bool\nr = find 4 2\nret eq r 2\nend\nfn tc_2 to bool\nr = find 20 5\nret eq r 4\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_293_otherside_rightangle", "language": "om", "prompt": "om2\nnote Write a function to find the third side of a right angled triangle.\nnote Omega name: w is w_ here.\nfn otherside_rightangle w_ long h long to f64\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_293_otherside_rightangle.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = otherside_rightangle 7 8\nret eq r 10.63014581273465\nend\nfn tc_1 to bool\nr = otherside_rightangle 3 4\nret eq r 5.0\nend\nfn tc_2 to bool\nr = otherside_rightangle 7 15\nret eq r 16.55294535724685\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_295_sum_div", "language": "om", "prompt": "om2\nnote Write a function to return the sum of all divisors of a number.\nfn sum_div number long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_295_sum_div.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = sum_div 8\nret eq r 7\nend\nfn tc_1 to bool\nr = sum_div 12\nret eq r 16\nend\nfn tc_2 to bool\nr = sum_div 7\nret eq r 1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_296_get_Inv_Count", "language": "om", "prompt": "om2\nnote Write an Omega function to count inversions in an array.\nfn get_Inv_Count arr view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_296_get_Inv_Count.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 20\nput a0 2 6\nput a0 3 4\nput a0 4 5\nr = get_Inv_Count a0\nret eq r 5\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 1\nr = get_Inv_Count a0\nret eq r 1\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 5\nput a0 3 6\nput a0 4 1\nr = get_Inv_Count a0\nret eq r 3\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_306_max_sum_increasing_subseq", "language": "om", "prompt": "om2\nnote Write a function to find the maximum sum of increasing subsequence from prefix until ith index and also including a given kth element which is after i, i.e., k > i .\nfn max_sum_increasing_subseq a view long * n long index long k long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_306_max_sum_increasing_subseq.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 101\nput a0 2 2\nput a0 3 3\nput a0 4 100\nput a0 5 4\nput a0 6 5\nr = max_sum_increasing_subseq a0 7 4 6\nret eq r 11\nend\nfn tc_1 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 101\nput a0 2 2\nput a0 3 3\nput a0 4 100\nput a0 5 4\nput a0 6 5\nr = max_sum_increasing_subseq a0 7 2 5\nret eq r 7\nend\nfn tc_2 to bool\na0 = new long 7 0\nput a0 0 11\nput a0 1 15\nput a0 2 19\nput a0 3 21\nput a0 4 26\nput a0 5 28\nput a0 6 31\nr = max_sum_increasing_subseq a0 7 2 4\nret eq r 71\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_309_maximum", "language": "om", "prompt": "om2\nnote Write an Omega function to find the maximum of two numbers.\nfn maximum a long b long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_309_maximum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = maximum 5 10\nret eq r 10\nend\nfn tc_1 to bool\nr = maximum -1 -2\nret eq r -1\nend\nfn tc_2 to bool\nr = maximum 9 7\nret eq r 9\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_388_highest_Power_of_2", "language": "om", "prompt": "om2\nnote Write an Omega function to find the highest power of 2 that is less than or equal to n.\nfn highest_Power_of_2 n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_388_highest_Power_of_2.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = highest_Power_of_2 10\nret eq r 8\nend\nfn tc_1 to bool\nr = highest_Power_of_2 19\nret eq r 16\nend\nfn tc_2 to bool\nr = highest_Power_of_2 32\nret eq r 32\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_389_find_lucas", "language": "om", "prompt": "om2\nnote Write a function to find the n'th lucas number.\nfn find_lucas n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_389_find_lucas.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = find_lucas 9\nret eq r 76\nend\nfn tc_1 to bool\nr = find_lucas 4\nret eq r 7\nend\nfn tc_2 to bool\nr = find_lucas 3\nret eq r 4\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_392_get_max_sum", "language": "om", "prompt": "om2\nnote Write a function to find the maximum sum possible by using the given equation f(n) = max( (f(n/2) + f(n/3) + f(n/4) + f(n/5)), n).\nfn get_max_sum n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_392_get_max_sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = get_max_sum 60\nret eq r 106\nend\nfn tc_1 to bool\nr = get_max_sum 10\nret eq r 12\nend\nfn tc_2 to bool\nr = get_max_sum 2\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_394_check_distinct", "language": "om", "prompt": "om2\nnote Write a function to check if given array contains no duplicates.\nfn check_distinct test_tup view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_394_check_distinct.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 4\nput a0 2 5\nput a0 3 6\nput a0 4 1\nput a0 5 4\nr = check_distinct a0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 4\nput a0 2 5\nput a0 3 6\nr = check_distinct a0\nret eq r true\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 2\nput a0 1 3\nput a0 2 4\nput a0 3 5\nput a0 4 6\nr = check_distinct a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_396_check_char", "language": "om", "prompt": "om2\nnote Write a function to check whether the given string starts and ends with the same character or not.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn check_char string view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_396_check_char.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"abba\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = check_char t0_0 res\nif ne r 5\nret false\nend\nif ne get res 0 86\nret false\nend\nif ne get res 1 97\nret false\nend\nif ne get res 2 108\nret false\nend\nif ne get res 3 105\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext t1_0 \"a\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = check_char t1_0 res\nif ne r 5\nret false\nend\nif ne get res 0 86\nret false\nend\nif ne get res 1 97\nret false\nend\nif ne get res 2 108\nret false\nend\nif ne get res 3 105\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext t2_0 \"abcd\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = check_char t2_0 res\nif ne r 7\nret false\nend\nif ne get res 0 73\nret false\nend\nif ne get res 1 110\nret false\nend\nif ne get res 2 118\nret false\nend\nif ne get res 3 97\nret false\nend\nif ne get res 4 108\nret false\nend\nif ne get res 5 105\nret false\nend\nif ne get res 6 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_397_median_numbers", "language": "om", "prompt": "om2\nnote Write a function to find the median of three numbers.\nfn median_numbers a long b long c long to f64\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_397_median_numbers.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = median_numbers 25 55 65\nret eq r 55.0\nend\nfn tc_1 to bool\nr = median_numbers 20 10 30\nret eq r 20.0\nend\nfn tc_2 to bool\nr = median_numbers 15 45 75\nret eq r 45.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_399_bitwise_xor", "language": "om", "prompt": "om2\nnote Write a function to perform the mathematical bitwise xor operation across the given tuples.\nnote Omega name: test_tup1 is test_tup here.\nnote Omega name: test_tup2 is test_tu_ here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn bitwise_xor test_tup view long * test_tu_ view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_399_bitwise_xor.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 10\nput a0 1 4\nput a0 2 6\nput a0 3 9\na1 = new long 4 0\nput a1 0 5\nput a1 1 2\nput a1 2 3\nput a1 3 3\nres = new long 4096 0\nr = bitwise_xor a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 15\nret false\nend\nif ne get res 1 6\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 10\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 11\nput a0 1 5\nput a0 2 7\nput a0 3 10\na1 = new long 4 0\nput a1 0 6\nput a1 1 3\nput a1 2 4\nput a1 3 4\nres = new long 4096 0\nr = bitwise_xor a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 13\nret false\nend\nif ne get res 1 6\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 14\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 12\nput a0 1 6\nput a0 2 8\nput a0 3 11\na1 = new long 4 0\nput a1 0 7\nput a1 1 4\nput a1 2 5\nput a1 3 6\nres = new long 4096 0\nr = bitwise_xor a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 11\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 13\nret false\nend\nif ne get res 3 13\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_404_minimum", "language": "om", "prompt": "om2\nnote Write an Omega function to find the minimum of two numbers.\nfn minimum a long b long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_404_minimum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = minimum 1 2\nret eq r 1\nend\nfn tc_1 to bool\nr = minimum -5 -4\nret eq r -5\nend\nfn tc_2 to bool\nr = minimum 0 0\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_406_find_Parity", "language": "om", "prompt": "om2\nnote Write an Omega function to find whether the parity of a given number is odd.\nfn find_Parity x long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_406_find_Parity.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = find_Parity 12\nret eq r false\nend\nfn tc_1 to bool\nr = find_Parity 7\nret eq r true\nend\nfn tc_2 to bool\nr = find_Parity 10\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_411_snake_to_camel", "language": "om", "prompt": "om2\nnote Write a function to convert the given snake case string to camel case string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn snake_to_camel word view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_411_snake_to_camel.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"android_tv\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = snake_to_camel t0_0 res\nif ne r 9\nret false\nend\nif ne get res 0 65\nret false\nend\nif ne get res 1 110\nret false\nend\nif ne get res 2 100\nret false\nend\nif ne get res 3 114\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 105\nret false\nend\nif ne get res 6 100\nret false\nend\nif ne get res 7 84\nret false\nend\nif ne get res 8 118\nret false\nend\nret true\nend\ntext t1_0 \"google_pixel\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = snake_to_camel t1_0 res\nif ne r 11\nret false\nend\nif ne get res 0 71\nret false\nend\nif ne get res 1 111\nret false\nend\nif ne get res 2 111\nret false\nend\nif ne get res 3 103\nret false\nend\nif ne get res 4 108\nret false\nend\nif ne get res 5 101\nret false\nend\nif ne get res 6 80\nret false\nend\nif ne get res 7 105\nret false\nend\nif ne get res 8 120\nret false\nend\nif ne get res 9 101\nret false\nend\nif ne get res 10 108\nret false\nend\nret true\nend\ntext t2_0 \"apple_watch\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = snake_to_camel t2_0 res\nif ne r 10\nret false\nend\nif ne get res 0 65\nret false\nend\nif ne get res 1 112\nret false\nend\nif ne get res 2 112\nret false\nend\nif ne get res 3 108\nret false\nend\nif ne get res 4 101\nret false\nend\nif ne get res 5 87\nret false\nend\nif ne get res 6 97\nret false\nend\nif ne get res 7 116\nret false\nend\nif ne get res 8 99\nret false\nend\nif ne get res 9 104\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_412_remove_odd", "language": "om", "prompt": "om2\nnote Write an Omega function to remove odd numbers from a given array.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn remove_odd l view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_412_remove_odd.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nres = new long 4096 0\nr = remove_odd a0 res\nif ne r 1\nret false\nend\nif ne get res 0 2\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 2\nput a0 1 4\nput a0 2 6\nres = new long 4096 0\nr = remove_odd a0 res\nif ne r 3\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 10\nput a0 1 20\nput a0 2 3\nres = new long 4096 0\nr = remove_odd a0 res\nif ne r 2\nret false\nend\nif ne get res 0 10\nret false\nend\nif ne get res 1 20\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_414_overlapping", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether any value in a sequence exists in a sequence or not.\nfn overlapping list1 view long * list2 view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_414_overlapping.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\na1 = new long 4 0\nput a1 0 6\nput a1 1 7\nput a1 2 8\nput a1 3 9\nr = overlapping a0 a1\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\na1 = new long 3 0\nput a1 0 4\nput a1 1 5\nput a1 2 6\nr = overlapping a0 a1\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 4\nput a0 2 5\na1 = new long 3 0\nput a1 0 1\nput a1 1 4\nput a1 2 5\nr = overlapping a0 a1\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_415_max_Product", "language": "om", "prompt": "om2\nnote Write an Omega function to find a pair with highest product from a given array of integers.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn max_Product arr view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_415_max_Product.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 7\nput a0 5 0\nput a0 6 8\nput a0 7 4\nres = new long 4096 0\nr = max_Product a0 res\nif ne r 2\nret false\nend\nif ne get res 0 7\nret false\nend\nif ne get res 1 8\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 7 0\nput a0 0 0\nput a0 1 -1\nput a0 2 -2\nput a0 3 -4\nput a0 4 5\nput a0 5 0\nput a0 6 -6\nres = new long 4096 0\nr = max_Product a0 res\nif ne r 2\nret false\nend\nif ne get res 0 -4\nret false\nend\nif ne get res 1 -6\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nres = new long 4096 0\nr = max_Product a0 res\nif ne r 2\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_420_cube_Sum", "language": "om", "prompt": "om2\nnote Write an Omega function to find the cube sum of first n even natural numbers.\nfn cube_Sum n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_420_cube_Sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = cube_Sum 2\nret eq r 72\nend\nfn tc_1 to bool\nr = cube_Sum 3\nret eq r 288\nend\nfn tc_2 to bool\nr = cube_Sum 4\nret eq r 800\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_422_find_Average_Of_Cube", "language": "om", "prompt": "om2\nnote Write an Omega function to find the average of cubes of first n natural numbers.\nfn find_Average_Of_Cube n long to f64\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_422_find_Average_Of_Cube.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = find_Average_Of_Cube 2\nret eq r 4.5\nend\nfn tc_1 to bool\nr = find_Average_Of_Cube 3\nret eq r 12.0\nend\nfn tc_2 to bool\nr = find_Average_Of_Cube 1\nret eq r 1.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_426_filter_oddnumbers", "language": "om", "prompt": "om2\nnote Write a function to filter odd numbers.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn filter_oddnumbers nums view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_426_filter_oddnumbers.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nput a0 9 10\nres = new long 4096 0\nr = filter_oddnumbers a0 res\nif ne r 5\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 7\nret false\nend\nif ne get res 4 9\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 10\nput a0 1 20\nput a0 2 45\nput a0 3 67\nput a0 4 84\nput a0 5 93\nres = new long 4096 0\nr = filter_oddnumbers a0 res\nif ne r 3\nret false\nend\nif ne get res 0 45\nret false\nend\nif ne get res 1 67\nret false\nend\nif ne get res 2 93\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 7 0\nput a0 0 5\nput a0 1 7\nput a0 2 9\nput a0 3 8\nput a0 4 6\nput a0 5 4\nput a0 6 3\nres = new long 4096 0\nr = filter_oddnumbers a0 res\nif ne r 4\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 7\nret false\nend\nif ne get res 2 9\nret false\nend\nif ne get res 3 3\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_427_change_date_format", "language": "om", "prompt": "om2\nnote Write a function to convert a date of yyyy-mm-dd format to dd-mm-yyyy format.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn change_date_format dt view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_427_change_date_format.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"2026-01-02\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = change_date_format t0_0 res\nif ne r 10\nret false\nend\nif ne get res 0 48\nret false\nend\nif ne get res 1 50\nret false\nend\nif ne get res 2 45\nret false\nend\nif ne get res 3 48\nret false\nend\nif ne get res 4 49\nret false\nend\nif ne get res 5 45\nret false\nend\nif ne get res 6 50\nret false\nend\nif ne get res 7 48\nret false\nend\nif ne get res 8 50\nret false\nend\nif ne get res 9 54\nret false\nend\nret true\nend\ntext t1_0 \"2020-11-13\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = change_date_format t1_0 res\nif ne r 10\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 51\nret false\nend\nif ne get res 2 45\nret false\nend\nif ne get res 3 49\nret false\nend\nif ne get res 4 49\nret false\nend\nif ne get res 5 45\nret false\nend\nif ne get res 6 50\nret false\nend\nif ne get res 7 48\nret false\nend\nif ne get res 8 50\nret false\nend\nif ne get res 9 48\nret false\nend\nret true\nend\ntext t2_0 \"2021-04-26\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = change_date_format t2_0 res\nif ne r 10\nret false\nend\nif ne get res 0 50\nret false\nend\nif ne get res 1 54\nret false\nend\nif ne get res 2 45\nret false\nend\nif ne get res 3 48\nret false\nend\nif ne get res 4 52\nret false\nend\nif ne get res 5 45\nret false\nend\nif ne get res 6 50\nret false\nend\nif ne get res 7 48\nret false\nend\nif ne get res 8 50\nret false\nend\nif ne get res 9 49\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_428_shell_sort", "language": "om", "prompt": "om2\nnote Write a function to sort the given array by using shell sort.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn shell_sort my_list view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_428_shell_sort.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 10 0\nput a0 0 12\nput a0 1 23\nput a0 2 4\nput a0 3 5\nput a0 4 3\nput a0 5 2\nput a0 6 12\nput a0 7 81\nput a0 8 56\nput a0 9 95\nres = new long 4096 0\nr = shell_sort a0 res\nif ne r 10\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 5\nret false\nend\nif ne get res 4 12\nret false\nend\nif ne get res 5 12\nret false\nend\nif ne get res 6 23\nret false\nend\nif ne get res 7 56\nret false\nend\nif ne get res 8 81\nret false\nend\nif ne get res 9 95\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 7 0\nput a0 0 24\nput a0 1 22\nput a0 2 39\nput a0 3 34\nput a0 4 87\nput a0 5 73\nput a0 6 68\nres = new long 4096 0\nr = shell_sort a0 res\nif ne r 7\nret false\nend\nif ne get res 0 22\nret false\nend\nif ne get res 1 24\nret false\nend\nif ne get res 2 34\nret false\nend\nif ne get res 3 39\nret false\nend\nif ne get res 4 68\nret false\nend\nif ne get res 5 73\nret false\nend\nif ne get res 6 87\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 7 0\nput a0 0 32\nput a0 1 30\nput a0 2 16\nput a0 3 96\nput a0 4 82\nput a0 5 83\nput a0 6 74\nres = new long 4096 0\nr = shell_sort a0 res\nif ne r 7\nret false\nend\nif ne get res 0 16\nret false\nend\nif ne get res 1 30\nret false\nend\nif ne get res 2 32\nret false\nend\nif ne get res 3 74\nret false\nend\nif ne get res 4 82\nret false\nend\nif ne get res 5 83\nret false\nend\nif ne get res 6 96\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_429_and_tuples", "language": "om", "prompt": "om2\nnote Write a function to extract the elementwise and tuples from the given two tuples.\nnote Omega name: test_tup1 is test_tup here.\nnote Omega name: test_tup2 is test_tu_ here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn and_tuples test_tup view long * test_tu_ view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_429_and_tuples.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 10\nput a0 1 4\nput a0 2 6\nput a0 3 9\na1 = new long 4 0\nput a1 0 5\nput a1 1 2\nput a1 2 3\nput a1 3 3\nres = new long 4096 0\nr = and_tuples a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 0\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 1\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\na1 = new long 4 0\nput a1 0 5\nput a1 1 6\nput a1 2 7\nput a1 3 8\nres = new long 4096 0\nr = and_tuples a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 0\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 8\nput a0 1 9\nput a0 2 11\nput a0 3 12\na1 = new long 4 0\nput a1 0 7\nput a1 1 13\nput a1 2 14\nput a1 3 17\nres = new long 4096 0\nr = and_tuples a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 9\nret false\nend\nif ne get res 2 10\nret false\nend\nif ne get res 3 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_430_parabola_directrix", "language": "om", "prompt": "om2\nnote Write a function to find the directrix of a parabola.\nfn parabola_directrix a long b long c long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_430_parabola_directrix.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = parabola_directrix 5 3 2\nret eq r -198\nend\nfn tc_1 to bool\nr = parabola_directrix 9 8 4\nret eq r -2336\nend\nfn tc_2 to bool\nr = parabola_directrix 2 4 6\nret eq r -130\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_432_median_trapezium", "language": "om", "prompt": "om2\nnote Write a function to find the median length of a trapezium.\nfn median_trapezium base1 long base2 long height long to f64\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_432_median_trapezium.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = median_trapezium 15 25 35\nret eq r 20.0\nend\nfn tc_1 to bool\nr = median_trapezium 10 20 30\nret eq r 15.0\nend\nfn tc_2 to bool\nr = median_trapezium 6 9 4\nret eq r 7.5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_433_check_greater", "language": "om", "prompt": "om2\nnote Write a function to check whether the entered number is greater than the elements of the given array.\nfn check_greater arr view long * number long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_433_check_greater.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nr = check_greater a0 4\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 2\nput a0 1 3\nput a0 2 4\nput a0 3 5\nput a0 4 6\nr = check_greater a0 8\nret eq r true\nend\nfn tc_2 to bool\na0 = new long 6 0\nput a0 0 9\nput a0 1 7\nput a0 2 4\nput a0 3 8\nput a0 4 6\nput a0 5 1\nr = check_greater a0 11\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_434_text_match_one", "language": "om", "prompt": "om2\nnote Write a function that matches a string that has an a followed by one or more b's.\nnote Omega name: text is text_ here.\nfn text_match_one text_ view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_434_text_match_one.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"ac\"\nfn tc_0 to bool\nr = text_match_one t0_0\nret eq r false\nend\ntext t1_0 \"dc\"\nfn tc_1 to bool\nr = text_match_one t1_0\nret eq r false\nend\ntext t2_0 \"abba\"\nfn tc_2 to bool\nr = text_match_one t2_0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_435_last_Digit", "language": "om", "prompt": "om2\nnote Write an Omega function to find the last digit of a given number.\nfn last_Digit n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_435_last_Digit.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = last_Digit 123\nret eq r 3\nend\nfn tc_1 to bool\nr = last_Digit 25\nret eq r 5\nend\nfn tc_2 to bool\nr = last_Digit 30\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_436_neg_nos", "language": "om", "prompt": "om2\nnote Write an Omega function to return the negative numbers in an array.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn neg_nos list1 view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_436_neg_nos.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 -1\nput a0 1 4\nput a0 2 5\nput a0 3 -6\nres = new long 4096 0\nr = neg_nos a0 res\nif ne r 2\nret false\nend\nif ne get res 0 -1\nret false\nend\nif ne get res 1 -6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = neg_nos a0 res\nif ne r 2\nret false\nend\nif ne get res 0 -1\nret false\nend\nif ne get res 1 -2\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 -7\nput a0 1 -6\nput a0 2 8\nput a0 3 9\nres = new long 4096 0\nr = neg_nos a0 res\nif ne r 2\nret false\nend\nif ne get res 0 -7\nret false\nend\nif ne get res 1 -6\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_437_remove_odd", "language": "om", "prompt": "om2\nnote Write a function to remove odd characters in a string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn remove_odd str1 view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_437_remove_odd.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"python\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = remove_odd t0_0 res\nif ne r 3\nret false\nend\nif ne get res 0 121\nret false\nend\nif ne get res 1 104\nret false\nend\nif ne get res 2 110\nret false\nend\nret true\nend\ntext t1_0 \"program\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = remove_odd t1_0 res\nif ne r 3\nret false\nend\nif ne get res 0 114\nret false\nend\nif ne get res 1 103\nret false\nend\nif ne get res 2 97\nret false\nend\nret true\nend\ntext t2_0 \"language\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = remove_odd t2_0 res\nif ne r 4\nret false\nend\nif ne get res 0 97\nret false\nend\nif ne get res 1 103\nret false\nend\nif ne get res 2 97\nret false\nend\nif ne get res 3 101\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_439_multiple_to_single", "language": "om", "prompt": "om2\nnote Write a function to join an array of multiple integers into a single integer.\nfn multiple_to_single L view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_439_multiple_to_single.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 11\nput a0 1 33\nput a0 2 50\nr = multiple_to_single a0\nret eq r 113350\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 -1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nr = multiple_to_single a0\nret eq r -123456\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 10\nput a0 1 15\nput a0 2 20\nput a0 3 25\nr = multiple_to_single a0\nret eq r 10152025\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_441_surfacearea_cube", "language": "om", "prompt": "om2\nnote Write a function to find the surface area of a cube of a given size.\nfn surfacearea_cube l long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_441_surfacearea_cube.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = surfacearea_cube 5\nret eq r 150\nend\nfn tc_1 to bool\nr = surfacearea_cube 3\nret eq r 54\nend\nfn tc_2 to bool\nr = surfacearea_cube 10\nret eq r 600\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_442_positive_count", "language": "om", "prompt": "om2\nnote Write a function to find the ration of positive numbers in an array of integers.\nfn positive_count nums view long * to f64\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_442_positive_count.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 13 0\nput a0 0 0\nput a0 1 1\nput a0 2 2\nput a0 3 -1\nput a0 4 -5\nput a0 5 6\nput a0 6 0\nput a0 7 -3\nput a0 8 -2\nput a0 9 3\nput a0 10 4\nput a0 11 6\nput a0 12 8\nr = positive_count a0\nret eq r 0.54\nend\nfn tc_1 to bool\na0 = new long 13 0\nput a0 0 2\nput a0 1 1\nput a0 2 2\nput a0 3 -1\nput a0 4 -5\nput a0 5 6\nput a0 6 4\nput a0 7 -3\nput a0 8 -2\nput a0 9 3\nput a0 10 4\nput a0 11 6\nput a0 12 8\nr = positive_count a0\nret eq r 0.69\nend\nfn tc_2 to bool\na0 = new long 9 0\nput a0 0 2\nput a0 1 4\nput a0 2 -6\nput a0 3 -9\nput a0 4 11\nput a0 5 -12\nput a0 6 14\nput a0 7 -5\nput a0 8 17\nr = positive_count a0\nret eq r 0.56\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_443_largest_neg", "language": "om", "prompt": "om2\nnote Write an Omega function to find the largest negative number from the given array.\nfn largest_neg list1 view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_443_largest_neg.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 -4\nput a0 4 -6\nr = largest_neg a0\nret eq r -6\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 -8\nput a0 4 -9\nr = largest_neg a0\nret eq r -9\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 -1\nr = largest_neg a0\nret eq r -1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_447_cube_nums", "language": "om", "prompt": "om2\nnote Write a function to find cubes of individual elements in an array.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn cube_nums nums view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_447_cube_nums.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nput a0 9 10\nres = new long 4096 0\nr = cube_nums a0 res\nif ne r 10\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 8\nret false\nend\nif ne get res 2 27\nret false\nend\nif ne get res 3 64\nret false\nend\nif ne get res 4 125\nret false\nend\nif ne get res 5 216\nret false\nend\nif ne get res 6 343\nret false\nend\nif ne get res 7 512\nret false\nend\nif ne get res 8 729\nret false\nend\nif ne get res 9 1000\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 10\nput a0 1 20\nput a0 2 30\nres = new long 4096 0\nr = cube_nums a0 res\nif ne r 3\nret false\nend\nif ne get res 0 1000\nret false\nend\nif ne get res 1 8000\nret false\nend\nif ne get res 2 27000\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 12\nput a0 1 15\nres = new long 4096 0\nr = cube_nums a0 res\nif ne r 2\nret false\nend\nif ne get res 0 1728\nret false\nend\nif ne get res 1 3375\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_448_cal_sum", "language": "om", "prompt": "om2\nnote Write a function to calculate the sum of perrin numbers.\nfn cal_sum n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_448_cal_sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = cal_sum 9\nret eq r 49\nend\nfn tc_1 to bool\nr = cal_sum 10\nret eq r 66\nend\nfn tc_2 to bool\nr = cal_sum 11\nret eq r 88\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_451_remove_whitespaces", "language": "om", "prompt": "om2\nnote Write a function to remove all whitespaces from the given string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn remove_whitespaces text1 view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_451_remove_whitespaces.py", "prompt_terminology": "reworded", "tests": "text t0_0 \" Google Flutter \"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = remove_whitespaces t0_0 res\nif ne r 13\nret false\nend\nif ne get res 0 71\nret false\nend\nif ne get res 1 111\nret false\nend\nif ne get res 2 111\nret false\nend\nif ne get res 3 103\nret false\nend\nif ne get res 4 108\nret false\nend\nif ne get res 5 101\nret false\nend\nif ne get res 6 70\nret false\nend\nif ne get res 7 108\nret false\nend\nif ne get res 8 117\nret false\nend\nif ne get res 9 116\nret false\nend\nif ne get res 10 116\nret false\nend\nif ne get res 11 101\nret false\nend\nif ne get res 12 114\nret false\nend\nret true\nend\ntext t1_0 \" Google Dart \"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = remove_whitespaces t1_0 res\nif ne r 10\nret false\nend\nif ne get res 0 71\nret false\nend\nif ne get res 1 111\nret false\nend\nif ne get res 2 111\nret false\nend\nif ne get res 3 103\nret false\nend\nif ne get res 4 108\nret false\nend\nif ne get res 5 101\nret false\nend\nif ne get res 6 68\nret false\nend\nif ne get res 7 97\nret false\nend\nif ne get res 8 114\nret false\nend\nif ne get res 9 116\nret false\nend\nret true\nend\ntext t2_0 \" iOS Swift \"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = remove_whitespaces t2_0 res\nif ne r 8\nret false\nend\nif ne get res 0 105\nret false\nend\nif ne get res 1 79\nret false\nend\nif ne get res 2 83\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 119\nret false\nend\nif ne get res 5 105\nret false\nend\nif ne get res 6 102\nret false\nend\nif ne get res 7 116\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_452_loss_amount", "language": "om", "prompt": "om2\nnote Write a function that gives loss amount on a sale if the given amount has loss else return 0.\nnote Omega name: actual_cost is actual_c here.\nnote Omega name: sale_amount is sale_amo here.\nfn loss_amount actual_c long sale_amo long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_452_loss_amount.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = loss_amount 1500 1200\nret eq r 0\nend\nfn tc_1 to bool\nr = loss_amount 100 200\nret eq r 100\nend\nfn tc_2 to bool\nr = loss_amount 2000 5000\nret eq r 3000\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_453_sumofFactors", "language": "om", "prompt": "om2\nnote Write an Omega function to find the sum of even factors of a number.\nfn sumofFactors n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_453_sumofFactors.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = sumofFactors 18\nret eq r 26\nend\nfn tc_1 to bool\nr = sumofFactors 30\nret eq r 48\nend\nfn tc_2 to bool\nr = sumofFactors 6\nret eq r 8\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_454_text_match_wordz", "language": "om", "prompt": "om2\nnote Write a function that matches a word containing 'z'.\nnote Omega name: text is text_ here.\nfn text_match_wordz text_ view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_454_text_match_wordz.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"pythonz.\"\nfn tc_0 to bool\nr = text_match_wordz t0_0\nret eq r true\nend\ntext t1_0 \"xyz.\"\nfn tc_1 to bool\nr = text_match_wordz t1_0\nret eq r true\nend\ntext t2_0 \" lang .\"\nfn tc_2 to bool\nr = text_match_wordz t2_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_455_check_monthnumb_number", "language": "om", "prompt": "om2\nnote Write a function to check whether the given month number contains 31 days or not.\nnote Omega name: monthnum2 is monthnum here.\nfn check_monthnumb_number monthnum long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_455_check_monthnumb_number.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = check_monthnumb_number 5\nret eq r true\nend\nfn tc_1 to bool\nr = check_monthnumb_number 2\nret eq r false\nend\nfn tc_2 to bool\nr = check_monthnumb_number 6\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_458_rectangle_area", "language": "om", "prompt": "om2\nnote Write a function to find the area of a rectangle.\nfn rectangle_area l long b long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_458_rectangle_area.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = rectangle_area 10 20\nret eq r 200\nend\nfn tc_1 to bool\nr = rectangle_area 10 5\nret eq r 50\nend\nfn tc_2 to bool\nr = rectangle_area 4 2\nret eq r 8\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_459_remove_uppercase", "language": "om", "prompt": "om2\nnote Write a function to remove uppercase substrings from a given string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn remove_uppercase str1 view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_459_remove_uppercase.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"cAstyoUrFavoRitETVshoWs\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = remove_uppercase t0_0 res\nif ne r 15\nret false\nend\nif ne get res 0 99\nret false\nend\nif ne get res 1 115\nret false\nend\nif ne get res 2 116\nret false\nend\nif ne get res 3 121\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 114\nret false\nend\nif ne get res 6 97\nret false\nend\nif ne get res 7 118\nret false\nend\nif ne get res 8 111\nret false\nend\nif ne get res 9 105\nret false\nend\nif ne get res 10 116\nret false\nend\nif ne get res 11 115\nret false\nend\nif ne get res 12 104\nret false\nend\nif ne get res 13 111\nret false\nend\nif ne get res 14 115\nret false\nend\nret true\nend\ntext t1_0 \"wAtchTheinTernEtrAdIo\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = remove_uppercase t1_0 res\nif ne r 15\nret false\nend\nif ne get res 0 119\nret false\nend\nif ne get res 1 116\nret false\nend\nif ne get res 2 99\nret false\nend\nif ne get res 3 104\nret false\nend\nif ne get res 4 104\nret false\nend\nif ne get res 5 101\nret false\nend\nif ne get res 6 105\nret false\nend\nif ne get res 7 110\nret false\nend\nif ne get res 8 101\nret false\nend\nif ne get res 9 114\nret false\nend\nif ne get res 10 110\nret false\nend\nif ne get res 11 116\nret false\nend\nif ne get res 12 114\nret false\nend\nif ne get res 13 100\nret false\nend\nif ne get res 14 111\nret false\nend\nret true\nend\ntext t2_0 \"VoicESeaRchAndreComMendaTionS\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = remove_uppercase t2_0 res\nif ne r 20\nret false\nend\nif ne get res 0 111\nret false\nend\nif ne get res 1 105\nret false\nend\nif ne get res 2 99\nret false\nend\nif ne get res 3 101\nret false\nend\nif ne get res 4 97\nret false\nend\nif ne get res 5 99\nret false\nend\nif ne get res 6 104\nret false\nend\nif ne get res 7 110\nret false\nend\nif ne get res 8 100\nret false\nend\nif ne get res 9 114\nret false\nend\nif ne get res 10 101\nret false\nend\nif ne get res 11 111\nret false\nend\nif ne get res 12 109\nret false\nend\nif ne get res 13 101\nret false\nend\nif ne get res 14 110\nret false\nend\nif ne get res 15 100\nret false\nend\nif ne get res 16 97\nret false\nend\nif ne get res 17 105\nret false\nend\nif ne get res 18 111\nret false\nend\nif ne get res 19 110\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_461_upper_ctr", "language": "om", "prompt": "om2\nnote Write an Omega function to count the upper case characters in a given string.\nfn upper_ctr str view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_461_upper_ctr.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"PYthon\"\nfn tc_0 to bool\nr = upper_ctr t0_0\nret eq r 1\nend\ntext t1_0 \"BigData\"\nfn tc_1 to bool\nr = upper_ctr t1_0\nret eq r 1\nend\ntext t2_0 \"program\"\nfn tc_2 to bool\nr = upper_ctr t2_0\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_463_max_subarray_product", "language": "om", "prompt": "om2\nnote Write a function to find the maximum product subarray of the given array.\nfn max_subarray_product arr view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_463_max_subarray_product.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 -2\nput a0 2 -3\nput a0 3 0\nput a0 4 7\nput a0 5 -8\nput a0 6 -2\nr = max_subarray_product a0\nret eq r 112\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 6\nput a0 1 -3\nput a0 2 -10\nput a0 3 0\nput a0 4 2\nr = max_subarray_product a0\nret eq r 180\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 -2\nput a0 1 -40\nput a0 2 0\nput a0 3 -2\nput a0 4 -3\nr = max_subarray_product a0\nret eq r 80\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_468_max_product", "language": "om", "prompt": "om2\nnote Write a function to find the maximum product formed by multiplying numbers of an increasing subsequence of that array.\nfn max_product arr view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_468_max_product.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 6 0\nput a0 0 3\nput a0 1 100\nput a0 2 4\nput a0 3 5\nput a0 4 150\nput a0 5 6\nr = max_product a0\nret eq r 3000\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 4\nput a0 1 42\nput a0 2 55\nput a0 3 68\nput a0 4 80\nr = max_product a0\nret eq r 50265600\nend\nfn tc_2 to bool\na0 = new long 8 0\nput a0 0 10\nput a0 1 22\nput a0 2 9\nput a0 3 33\nput a0 4 21\nput a0 5 50\nput a0 6 41\nput a0 7 60\nr = max_product a0\nret eq r 2460\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_470_add_pairwise", "language": "om", "prompt": "om2\nnote Write a function to find the pairwise addition of the neighboring elements of the given array.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn add_pairwise test_tup view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_470_add_pairwise.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 5\nput a0 2 7\nput a0 3 8\nput a0 4 10\nres = new long 4096 0\nr = add_pairwise a0 res\nif ne r 4\nret false\nend\nif ne get res 0 6\nret false\nend\nif ne get res 1 12\nret false\nend\nif ne get res 2 15\nret false\nend\nif ne get res 3 18\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 2\nput a0 1 6\nput a0 2 8\nput a0 3 9\nput a0 4 11\nres = new long 4096 0\nr = add_pairwise a0 res\nif ne r 4\nret false\nend\nif ne get res 0 8\nret false\nend\nif ne get res 1 14\nret false\nend\nif ne get res 2 17\nret false\nend\nif ne get res 3 20\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 7\nput a0 2 9\nput a0 3 10\nput a0 4 12\nres = new long 4096 0\nr = add_pairwise a0 res\nif ne r 4\nret false\nend\nif ne get res 0 10\nret false\nend\nif ne get res 1 16\nret false\nend\nif ne get res 2 19\nret false\nend\nif ne get res 3 22\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_471_find_remainder", "language": "om", "prompt": "om2\nnote Write an Omega function to find the product of the array multiplication modulo n.\nfn find_remainder arr view long * n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_471_find_remainder.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 6 0\nput a0 0 100\nput a0 1 10\nput a0 2 5\nput a0 3 25\nput a0 4 35\nput a0 5 14\nr = find_remainder a0 11\nret eq r 9\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 1\nput a0 2 1\nr = find_remainder a0 1\nret eq r 0\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 1\nr = find_remainder a0 2\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_472_check_Consecutive", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether the given array contains consecutive numbers or not.\nfn check_Consecutive l view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_472_check_Consecutive.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nr = check_Consecutive a0\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 5\nput a0 4 6\nr = check_Consecutive a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 1\nr = check_Consecutive a0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_476_big_sum", "language": "om", "prompt": "om2\nnote Write an Omega function to find the sum of the largest and smallest value in a given array.\nfn big_sum nums view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_476_big_sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = big_sum a0\nret eq r 4\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 -1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nr = big_sum a0\nret eq r 3\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 2\nput a0 1 3\nput a0 2 6\nr = big_sum a0\nret eq r 8\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_477_is_lower", "language": "om", "prompt": "om2\nnote Write an Omega function to convert the given string to lower case.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn is_lower string view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_477_is_lower.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"InValid\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = is_lower t0_0 res\nif ne r 7\nret false\nend\nif ne get res 0 105\nret false\nend\nif ne get res 1 110\nret false\nend\nif ne get res 2 118\nret false\nend\nif ne get res 3 97\nret false\nend\nif ne get res 4 108\nret false\nend\nif ne get res 5 105\nret false\nend\nif ne get res 6 100\nret false\nend\nret true\nend\ntext t1_0 \"TruE\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = is_lower t1_0 res\nif ne r 4\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 114\nret false\nend\nif ne get res 2 117\nret false\nend\nif ne get res 3 101\nret false\nend\nret true\nend\ntext t2_0 \"SenTenCE\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = is_lower t2_0 res\nif ne r 8\nret false\nend\nif ne get res 0 115\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 110\nret false\nend\nif ne get res 3 116\nret false\nend\nif ne get res 4 101\nret false\nend\nif ne get res 5 110\nret false\nend\nif ne get res 6 99\nret false\nend\nif ne get res 7 101\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_478_remove_lowercase", "language": "om", "prompt": "om2\nnote Write a function to remove lowercase substrings from a given string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn remove_lowercase str1 view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_478_remove_lowercase.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"PYTHon\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = remove_lowercase t0_0 res\nif ne r 4\nret false\nend\nif ne get res 0 80\nret false\nend\nif ne get res 1 89\nret false\nend\nif ne get res 2 84\nret false\nend\nif ne get res 3 72\nret false\nend\nret true\nend\ntext t1_0 \"FInD\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = remove_lowercase t1_0 res\nif ne r 3\nret false\nend\nif ne get res 0 70\nret false\nend\nif ne get res 1 73\nret false\nend\nif ne get res 2 68\nret false\nend\nret true\nend\ntext t2_0 \"STRinG\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = remove_lowercase t2_0 res\nif ne r 4\nret false\nend\nif ne get res 0 83\nret false\nend\nif ne get res 1 84\nret false\nend\nif ne get res 2 82\nret false\nend\nif ne get res 3 71\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_479_first_Digit", "language": "om", "prompt": "om2\nnote Write an Omega function to find the first digit of a given number.\nfn first_Digit n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_479_first_Digit.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = first_Digit 123\nret eq r 1\nend\nfn tc_1 to bool\nr = first_Digit 456\nret eq r 4\nend\nfn tc_2 to bool\nr = first_Digit 12\nret eq r 1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_554_Split", "language": "om", "prompt": "om2\nnote Write an Omega function which takes an array of integers and only returns the odd ones.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn Split list view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_554_Split.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nres = new long 4096 0\nr = Split a0 res\nif ne r 3\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 5\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 10\nput a0 1 11\nput a0 2 12\nput a0 3 13\nres = new long 4096 0\nr = Split a0 res\nif ne r 2\nret false\nend\nif ne get res 0 11\nret false\nend\nif ne get res 1 13\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 7\nput a0 1 8\nput a0 2 9\nput a0 3 1\nres = new long 4096 0\nr = Split a0 res\nif ne r 3\nret false\nend\nif ne get res 0 7\nret false\nend\nif ne get res 1 9\nret false\nend\nif ne get res 2 1\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_555_difference", "language": "om", "prompt": "om2\nnote Write an Omega function to find the difference between the sum of cubes of the first n natural numbers and the sum of the first n natural numbers.\nfn difference n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_555_difference.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = difference 3\nret eq r 30\nend\nfn tc_1 to bool\nr = difference 5\nret eq r 210\nend\nfn tc_2 to bool\nr = difference 2\nret eq r 6\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_556_find_Odd_Pair", "language": "om", "prompt": "om2\nnote Write an Omega function to count the number of pairs whose xor value is odd.\nfn find_Odd_Pair A view long * N long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_556_find_Odd_Pair.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 5\nput a0 1 4\nput a0 2 7\nput a0 3 2\nput a0 4 1\nr = find_Odd_Pair a0 5\nret eq r 6\nend\nfn tc_1 to bool\na0 = new long 7 0\nput a0 0 7\nput a0 1 2\nput a0 2 8\nput a0 3 1\nput a0 4 0\nput a0 5 5\nput a0 6 11\nr = find_Odd_Pair a0 7\nret eq r 12\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = find_Odd_Pair a0 3\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_557_toggle_string", "language": "om", "prompt": "om2\nnote Write a function to toggle the case of all characters in a string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn toggle_string string view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_557_toggle_string.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"Python\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = toggle_string t0_0 res\nif ne r 6\nret false\nend\nif ne get res 0 112\nret false\nend\nif ne get res 1 89\nret false\nend\nif ne get res 2 84\nret false\nend\nif ne get res 3 72\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 78\nret false\nend\nret true\nend\ntext t1_0 \"Pangram\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = toggle_string t1_0 res\nif ne r 7\nret false\nend\nif ne get res 0 112\nret false\nend\nif ne get res 1 65\nret false\nend\nif ne get res 2 78\nret false\nend\nif ne get res 3 71\nret false\nend\nif ne get res 4 82\nret false\nend\nif ne get res 5 65\nret false\nend\nif ne get res 6 77\nret false\nend\nret true\nend\ntext t2_0 \"LIttLE\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = toggle_string t2_0 res\nif ne r 6\nret false\nend\nif ne get res 0 108\nret false\nend\nif ne get res 1 105\nret false\nend\nif ne get res 2 84\nret false\nend\nif ne get res 3 84\nret false\nend\nif ne get res 4 108\nret false\nend\nif ne get res 5 101\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_558_digit_distance_nums", "language": "om", "prompt": "om2\nnote Write an Omega function to find the sum of the per-digit difference between two integers.\nfn digit_distance_nums n1 long n2 long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_558_digit_distance_nums.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = digit_distance_nums 1 2\nret eq r 1\nend\nfn tc_1 to bool\nr = digit_distance_nums 23 56\nret eq r 6\nend\nfn tc_2 to bool\nr = digit_distance_nums 123 256\nret eq r 7\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_559_max_sub_array_sum", "language": "om", "prompt": "om2\nnote Write a function to find the sum of the largest contiguous sublist in the given array.\nfn max_sub_array_sum a view long * size long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_559_max_sub_array_sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 8 0\nput a0 0 -2\nput a0 1 -3\nput a0 2 4\nput a0 3 -1\nput a0 4 -2\nput a0 5 1\nput a0 6 5\nput a0 7 -3\nr = max_sub_array_sum a0 8\nret eq r 7\nend\nfn tc_1 to bool\na0 = new long 8 0\nput a0 0 -3\nput a0 1 -4\nput a0 2 5\nput a0 3 -2\nput a0 4 -3\nput a0 5 2\nput a0 6 6\nput a0 7 -4\nr = max_sub_array_sum a0 8\nret eq r 8\nend\nfn tc_2 to bool\na0 = new long 8 0\nput a0 0 -4\nput a0 1 -5\nput a0 2 6\nput a0 3 -3\nput a0 4 -4\nput a0 5 3\nput a0 6 7\nput a0 7 -5\nr = max_sub_array_sum a0 8\nret eq r 10\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_560_union_elements", "language": "om", "prompt": "om2\nnote Write a function to find the union of the elements of two given lists and output them in sorted order.\nnote Omega name: test_tup1 is test_tup here.\nnote Omega name: test_tup2 is test_tu_ here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn union_elements test_tup view long * test_tu_ view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_560_union_elements.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 3\nput a0 1 4\nput a0 2 5\nput a0 3 6\na1 = new long 4 0\nput a1 0 5\nput a1 1 7\nput a1 2 4\nput a1 3 10\nres = new long 4096 0\nr = union_elements a0 a1 res\nif ne r 6\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 6\nret false\nend\nif ne get res 4 7\nret false\nend\nif ne get res 5 10\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\na1 = new long 4 0\nput a1 0 3\nput a1 1 4\nput a1 2 5\nput a1 3 6\nres = new long 4096 0\nr = union_elements a0 a1 res\nif ne r 6\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 5\nret false\nend\nif ne get res 5 6\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 11\nput a0 1 12\nput a0 2 13\nput a0 3 14\na1 = new long 4 0\nput a1 0 13\nput a1 1 15\nput a1 2 16\nput a1 3 17\nres = new long 4096 0\nr = union_elements a0 a1 res\nif ne r 7\nret false\nend\nif ne get res 0 11\nret false\nend\nif ne get res 1 12\nret false\nend\nif ne get res 2 13\nret false\nend\nif ne get res 3 14\nret false\nend\nif ne get res 4 15\nret false\nend\nif ne get res 5 16\nret false\nend\nif ne get res 6 17\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_564_count_Pairs", "language": "om", "prompt": "om2\nnote Write an Omega function which takes an array of integers and counts the number of possible unordered pairs where both elements are unequal.\nfn count_Pairs arr view long * n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_564_count_Pairs.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 1\nr = count_Pairs a0 3\nret eq r 2\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 1\nput a0 2 1\nput a0 3 1\nr = count_Pairs a0 4\nret eq r 0\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nr = count_Pairs a0 5\nret eq r 10\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_566_sum_digits", "language": "om", "prompt": "om2\nnote Write a function to get the sum of the digits of a non-negative integer.\nfn sum_digits n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_566_sum_digits.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = sum_digits 345\nret eq r 12\nend\nfn tc_1 to bool\nr = sum_digits 12\nret eq r 3\nend\nfn tc_2 to bool\nr = sum_digits 97\nret eq r 16\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_567_issort_list", "language": "om", "prompt": "om2\nnote Write a function to check whether a specified array is sorted or not.\nfn issort_list list1 view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_567_issort_list.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 6\nput a0 4 8\nput a0 5 10\nput a0 6 12\nput a0 7 14\nput a0 8 16\nput a0 9 17\nr = issort_list a0\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 6\nput a0 4 8\nput a0 5 10\nput a0 6 12\nput a0 7 14\nput a0 8 20\nput a0 9 17\nr = issort_list a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 9 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 6\nput a0 4 8\nput a0 5 10\nput a0 6 15\nput a0 7 14\nput a0 8 20\nr = issort_list a0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_572_two_unique_nums", "language": "om", "prompt": "om2\nnote Write an Omega function to remove duplicate numbers from a given number of lists.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn two_unique_nums nums view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_572_two_unique_nums.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 7 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 2\nput a0 4 3\nput a0 5 4\nput a0 6 5\nres = new long 4096 0\nr = two_unique_nums a0 res\nif ne r 3\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 5\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 2\nput a0 4 4\nput a0 5 5\nres = new long 4096 0\nr = two_unique_nums a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 5\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nres = new long 4096 0\nr = two_unique_nums a0 res\nif ne r 5\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 5\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_573_unique_product", "language": "om", "prompt": "om2\nnote Write an Omega function to calculate the product of the unique numbers in a given array.\nnote Omega name: list_data is list_dat here.\nfn unique_product list_dat view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_573_unique_product.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 8 0\nput a0 0 10\nput a0 1 20\nput a0 2 30\nput a0 3 40\nput a0 4 20\nput a0 5 50\nput a0 6 60\nput a0 7 40\nr = unique_product a0\nret eq r 720000000\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 1\nr = unique_product a0\nret eq r 6\nend\nfn tc_2 to bool\na0 = new long 6 0\nput a0 0 7\nput a0 1 8\nput a0 2 9\nput a0 3 0\nput a0 4 1\nput a0 5 1\nr = unique_product a0\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_574_surfacearea_cylinder", "language": "om", "prompt": "om2\nnote Write a function to find the surface area of a cylinder.\nnote Omega name: r is r_ here.\nfn surfacearea_cylinder r_ long h long to f64\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_574_surfacearea_cylinder.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = surfacearea_cylinder 10 5\nret eq r 942.45\nend\nfn tc_1 to bool\nr = surfacearea_cylinder 4 5\nret eq r 226.18800000000002\nend\nfn tc_2 to bool\nr = surfacearea_cylinder 4 10\nret eq r 351.848\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_576_is_Sub_Array", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether an array is sublist of another or not.\nfn is_Sub_Array A view long * B view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_576_is_Sub_Array.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 4\nput a0 2 3\nput a0 3 5\na1 = new long 2 0\nput a1 0 1\nput a1 1 2\nr = is_Sub_Array a0 a1\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 1\na1 = new long 3 0\nput a1 0 1\nput a1 1 2\nput a1 2 1\nr = is_Sub_Array a0 a1\nret eq r true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 0\nput a0 2 2\nput a0 3 2\na1 = new long 3 0\nput a1 0 2\nput a1 1 2\nput a1 2 0\nr = is_Sub_Array a0 a1\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_577_last_Digit_Factorial", "language": "om", "prompt": "om2\nnote Write an Omega function to find the last digit in factorial of a given number.\nfn last_Digit_Factorial n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_577_last_Digit_Factorial.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = last_Digit_Factorial 4\nret eq r 4\nend\nfn tc_1 to bool\nr = last_Digit_Factorial 21\nret eq r 0\nend\nfn tc_2 to bool\nr = last_Digit_Factorial 30\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_579_find_dissimilar", "language": "om", "prompt": "om2\nnote Write a function to find the dissimilar elements in the given two tuples.\nnote Omega name: test_tup1 is test_tup here.\nnote Omega name: test_tup2 is test_tu_ here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn find_dissimilar test_tup view long * test_tu_ view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_579_find_dissimilar.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 3\nput a0 1 4\nput a0 2 5\nput a0 3 6\na1 = new long 4 0\nput a1 0 5\nput a1 1 7\nput a1 2 4\nput a1 3 10\nres = new long 4096 0\nr = find_dissimilar a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 6\nret false\nend\nif ne get res 2 7\nret false\nend\nif ne get res 3 10\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\na1 = new long 4 0\nput a1 0 7\nput a1 1 2\nput a1 2 3\nput a1 3 9\nres = new long 4096 0\nr = find_dissimilar a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 7\nret false\nend\nif ne get res 3 9\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 21\nput a0 1 11\nput a0 2 25\nput a0 3 26\na1 = new long 4 0\nput a1 0 26\nput a1 1 34\nput a1 2 21\nput a1 3 36\nres = new long 4096 0\nr = find_dissimilar a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 34\nret false\nend\nif ne get res 1 36\nret false\nend\nif ne get res 2 11\nret false\nend\nif ne get res 3 25\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_581_surface_Area", "language": "om", "prompt": "om2\nnote Write an Omega function to find the surface area of a square pyramid with a given base edge and height.\nfn surface_Area b long s long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_581_surface_Area.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = surface_Area 3 4\nret eq r 33\nend\nfn tc_1 to bool\nr = surface_Area 4 5\nret eq r 56\nend\nfn tc_2 to bool\nr = surface_Area 1 2\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_583_catalan_number", "language": "om", "prompt": "om2\nnote Write a function which returns nth catalan number.\nfn catalan_number num long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_583_catalan_number.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = catalan_number 10\nret eq r 16796\nend\nfn tc_1 to bool\nr = catalan_number 9\nret eq r 4862\nend\nfn tc_2 to bool\nr = catalan_number 7\nret eq r 429\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_584_find_adverbs", "language": "om", "prompt": "om2\nnote Write a function to find the first adverb ending with ly and its positions in a given string.\nnote Omega name: text is text_ here.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn find_adverbs text_ view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_584_find_adverbs.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"Clearly, he has no excuse for such behavior.\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = find_adverbs t0_0 res\nif ne r 12\nret false\nend\nif ne get res 0 48\nret false\nend\nif ne get res 1 45\nret false\nend\nif ne get res 2 55\nret false\nend\nif ne get res 3 58\nret false\nend\nif ne get res 4 32\nret false\nend\nif ne get res 5 67\nret false\nend\nif ne get res 6 108\nret false\nend\nif ne get res 7 101\nret false\nend\nif ne get res 8 97\nret false\nend\nif ne get res 9 114\nret false\nend\nif ne get res 10 108\nret false\nend\nif ne get res 11 121\nret false\nend\nret true\nend\ntext t1_0 \"Please handle the situation carefuly\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = find_adverbs t1_0 res\nif ne r 15\nret false\nend\nif ne get res 0 50\nret false\nend\nif ne get res 1 56\nret false\nend\nif ne get res 2 45\nret false\nend\nif ne get res 3 51\nret false\nend\nif ne get res 4 54\nret false\nend\nif ne get res 5 58\nret false\nend\nif ne get res 6 32\nret false\nend\nif ne get res 7 99\nret false\nend\nif ne get res 8 97\nret false\nend\nif ne get res 9 114\nret false\nend\nif ne get res 10 101\nret false\nend\nif ne get res 11 102\nret false\nend\nif ne get res 12 117\nret false\nend\nif ne get res 13 108\nret false\nend\nif ne get res 14 121\nret false\nend\nret true\nend\ntext t2_0 \"Complete the task quickly\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = find_adverbs t2_0 res\nif ne r 14\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 56\nret false\nend\nif ne get res 2 45\nret false\nend\nif ne get res 3 50\nret false\nend\nif ne get res 4 53\nret false\nend\nif ne get res 5 58\nret false\nend\nif ne get res 6 32\nret false\nend\nif ne get res 7 113\nret false\nend\nif ne get res 8 117\nret false\nend\nif ne get res 9 105\nret false\nend\nif ne get res 10 99\nret false\nend\nif ne get res 11 107\nret false\nend\nif ne get res 12 108\nret false\nend\nif ne get res 13 121\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_586_split_Arr", "language": "om", "prompt": "om2\nnote Write an Omega function to split an array at the nth eelment and add the first part to the end.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn split_Arr l view long * n long res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_586_split_Arr.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 6 0\nput a0 0 12\nput a0 1 10\nput a0 2 5\nput a0 3 6\nput a0 4 52\nput a0 5 36\nres = new long 4096 0\nr = split_Arr a0 2 res\nif ne r 6\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 6\nret false\nend\nif ne get res 2 52\nret false\nend\nif ne get res 3 36\nret false\nend\nif ne get res 4 12\nret false\nend\nif ne get res 5 10\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = split_Arr a0 1 res\nif ne r 4\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 8 0\nput a0 0 0\nput a0 1 1\nput a0 2 2\nput a0 3 3\nput a0 4 4\nput a0 5 5\nput a0 6 6\nput a0 7 7\nres = new long 4096 0\nr = split_Arr a0 3 res\nif ne r 8\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 6\nret false\nend\nif ne get res 4 7\nret false\nend\nif ne get res 5 0\nret false\nend\nif ne get res 6 1\nret false\nend\nif ne get res 7 2\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_588_big_diff", "language": "om", "prompt": "om2\nnote Write an Omega function to find the difference between largest and smallest value in a given array.\nfn big_diff nums view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_588_big_diff.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nr = big_diff a0\nret eq r 3\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 4\nput a0 1 5\nput a0 2 12\nr = big_diff a0\nret eq r 8\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 9\nput a0 1 2\nput a0 2 3\nr = big_diff a0\nret eq r 7\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_589_perfect_squares", "language": "om", "prompt": "om2\nnote Write a function to find perfect squares between two given numbers.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn perfect_squares a long b long res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_589_perfect_squares.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = perfect_squares 1 30 res\nif ne r 5\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 9\nret false\nend\nif ne get res 3 16\nret false\nend\nif ne get res 4 25\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = perfect_squares 50 100 res\nif ne r 3\nret false\nend\nif ne get res 0 64\nret false\nend\nif ne get res 1 81\nret false\nend\nif ne get res 2 100\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = perfect_squares 100 200 res\nif ne r 5\nret false\nend\nif ne get res 0 100\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 144\nret false\nend\nif ne get res 3 169\nret false\nend\nif ne get res 4 196\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_591_swap_List", "language": "om", "prompt": "om2\nnote Write an Omega function to interchange the first and last elements in an array.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn swap_List newList view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_591_swap_List.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 12\nput a0 1 35\nput a0 2 9\nput a0 3 56\nput a0 4 24\nres = new long 4096 0\nr = swap_List a0 res\nif ne r 5\nret false\nend\nif ne get res 0 24\nret false\nend\nif ne get res 1 35\nret false\nend\nif ne get res 2 9\nret false\nend\nif ne get res 3 56\nret false\nend\nif ne get res 4 12\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nres = new long 4096 0\nr = swap_List a0 res\nif ne r 3\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 4\nput a0 1 5\nput a0 2 6\nres = new long 4096 0\nr = swap_List a0 res\nif ne r 3\nret false\nend\nif ne get res 0 6\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 4\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_592_sum_Of_product", "language": "om", "prompt": "om2\nnote Write an Omega function to find the sum of the product of consecutive binomial co-efficients.\nfn sum_Of_product n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_592_sum_Of_product.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = sum_Of_product 3\nret eq r 15\nend\nfn tc_1 to bool\nr = sum_Of_product 4\nret eq r 56\nend\nfn tc_2 to bool\nr = sum_Of_product 1\nret eq r 1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_593_removezero_ip", "language": "om", "prompt": "om2\nnote Write a function to remove leading zeroes from an ip address.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn removezero_ip ip view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_593_removezero_ip.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"216.08.094.196\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = removezero_ip t0_0 res\nif ne r 12\nret false\nend\nif ne get res 0 50\nret false\nend\nif ne get res 1 49\nret false\nend\nif ne get res 2 54\nret false\nend\nif ne get res 3 46\nret false\nend\nif ne get res 4 56\nret false\nend\nif ne get res 5 46\nret false\nend\nif ne get res 6 57\nret false\nend\nif ne get res 7 52\nret false\nend\nif ne get res 8 46\nret false\nend\nif ne get res 9 49\nret false\nend\nif ne get res 10 57\nret false\nend\nif ne get res 11 54\nret false\nend\nret true\nend\ntext t1_0 \"12.01.024\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = removezero_ip t1_0 res\nif ne r 7\nret false\nend\nif ne get res 0 49\nret false\nend\nif ne get res 1 50\nret false\nend\nif ne get res 2 46\nret false\nend\nif ne get res 3 49\nret false\nend\nif ne get res 4 46\nret false\nend\nif ne get res 5 50\nret false\nend\nif ne get res 6 52\nret false\nend\nret true\nend\ntext t2_0 \"216.08.094.0196\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = removezero_ip t2_0 res\nif ne r 12\nret false\nend\nif ne get res 0 50\nret false\nend\nif ne get res 1 49\nret false\nend\nif ne get res 2 54\nret false\nend\nif ne get res 3 46\nret false\nend\nif ne get res 4 56\nret false\nend\nif ne get res 5 46\nret false\nend\nif ne get res 6 57\nret false\nend\nif ne get res 7 52\nret false\nend\nif ne get res 8 46\nret false\nend\nif ne get res 9 49\nret false\nend\nif ne get res 10 57\nret false\nend\nif ne get res 11 54\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_594_diff_even_odd", "language": "om", "prompt": "om2\nnote Write a function to find the difference of the first even and first odd number of a given array.\nfn diff_even_odd list1 view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_594_diff_even_odd.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 3\nput a0 2 5\nput a0 3 7\nput a0 4 4\nput a0 5 1\nput a0 6 6\nput a0 7 8\nr = diff_even_odd a0\nret eq r 3\nend\nfn tc_1 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nput a0 9 10\nr = diff_even_odd a0\nret eq r 1\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 5\nput a0 2 7\nput a0 3 9\nput a0 4 10\nr = diff_even_odd a0\nret eq r 9\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_597_find_kth", "language": "om", "prompt": "om2\nnote Write a function to find kth element from the given two sorted arrays.\nfn find_kth arr1 view long * arr2 view long * k long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_597_find_kth.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 2\nput a0 1 3\nput a0 2 6\nput a0 3 7\nput a0 4 9\na1 = new long 4 0\nput a1 0 1\nput a1 1 4\nput a1 2 8\nput a1 3 10\nr = find_kth a0 a1 5\nret eq r 6\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 100\nput a0 1 112\nput a0 2 256\nput a0 3 349\nput a0 4 770\na1 = new long 7 0\nput a1 0 72\nput a1 1 86\nput a1 2 113\nput a1 3 119\nput a1 4 265\nput a1 5 445\nput a1 6 892\nr = find_kth a0 a1 7\nret eq r 256\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 4\nput a0 2 7\nput a0 3 8\nput a0 4 10\na1 = new long 4 0\nput a1 0 2\nput a1 1 5\nput a1 2 9\nput a1 3 11\nr = find_kth a0 a1 6\nret eq r 8\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_598_armstrong_number", "language": "om", "prompt": "om2\nnote Write a function to check whether the given number is armstrong or not.\nfn armstrong_number number long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_598_armstrong_number.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = armstrong_number 153\nret eq r true\nend\nfn tc_1 to bool\nr = armstrong_number 259\nret eq r false\nend\nfn tc_2 to bool\nr = armstrong_number 4458\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_600_is_Even", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether the given number is even or not.\nfn is_Even n long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_600_is_Even.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_Even 1\nret eq r false\nend\nfn tc_1 to bool\nr = is_Even 2\nret eq r true\nend\nfn tc_2 to bool\nr = is_Even 3\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_603_get_ludic", "language": "om", "prompt": "om2\nnote Write a function to get all lucid numbers smaller than or equal to a given integer.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_ludic n long res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_603_get_ludic.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = get_ludic 10 res\nif ne r 5\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 5\nret false\nend\nif ne get res 4 7\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = get_ludic 25 res\nif ne r 10\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 5\nret false\nend\nif ne get res 4 7\nret false\nend\nif ne get res 5 11\nret false\nend\nif ne get res 6 13\nret false\nend\nif ne get res 7 17\nret false\nend\nif ne get res 8 23\nret false\nend\nif ne get res 9 25\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = get_ludic 45 res\nif ne r 14\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 5\nret false\nend\nif ne get res 4 7\nret false\nend\nif ne get res 5 11\nret false\nend\nif ne get res 6 13\nret false\nend\nif ne get res 7 17\nret false\nend\nif ne get res 8 23\nret false\nend\nif ne get res 9 25\nret false\nend\nif ne get res 10 29\nret false\nend\nif ne get res 11 37\nret false\nend\nif ne get res 12 41\nret false\nend\nif ne get res 13 43\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_604_reverse_words", "language": "om", "prompt": "om2\nnote Write a function to reverse words seperated by spaces in a given string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn reverse_words s view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_604_reverse_words.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"python program\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = reverse_words t0_0 res\nif ne r 14\nret false\nend\nif ne get res 0 112\nret false\nend\nif ne get res 1 114\nret false\nend\nif ne get res 2 111\nret false\nend\nif ne get res 3 103\nret false\nend\nif ne get res 4 114\nret false\nend\nif ne get res 5 97\nret false\nend\nif ne get res 6 109\nret false\nend\nif ne get res 7 32\nret false\nend\nif ne get res 8 112\nret false\nend\nif ne get res 9 121\nret false\nend\nif ne get res 10 116\nret false\nend\nif ne get res 11 104\nret false\nend\nif ne get res 12 111\nret false\nend\nif ne get res 13 110\nret false\nend\nret true\nend\ntext t1_0 \"java language\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = reverse_words t1_0 res\nif ne r 13\nret false\nend\nif ne get res 0 108\nret false\nend\nif ne get res 1 97\nret false\nend\nif ne get res 2 110\nret false\nend\nif ne get res 3 103\nret false\nend\nif ne get res 4 117\nret false\nend\nif ne get res 5 97\nret false\nend\nif ne get res 6 103\nret false\nend\nif ne get res 7 101\nret false\nend\nif ne get res 8 32\nret false\nend\nif ne get res 9 106\nret false\nend\nif ne get res 10 97\nret false\nend\nif ne get res 11 118\nret false\nend\nif ne get res 12 97\nret false\nend\nret true\nend\ntext t2_0 \"indian man\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = reverse_words t2_0 res\nif ne r 10\nret false\nend\nif ne get res 0 109\nret false\nend\nif ne get res 1 97\nret false\nend\nif ne get res 2 110\nret false\nend\nif ne get res 3 32\nret false\nend\nif ne get res 4 105\nret false\nend\nif ne get res 5 110\nret false\nend\nif ne get res 6 100\nret false\nend\nif ne get res 7 105\nret false\nend\nif ne get res 8 97\nret false\nend\nif ne get res 9 110\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_605_prime_num", "language": "om", "prompt": "om2\nnote Write a function to check if the given integer is a prime number.\nfn prime_num num long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_605_prime_num.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = prime_num 13\nret eq r true\nend\nfn tc_1 to bool\nr = prime_num 7\nret eq r true\nend\nfn tc_2 to bool\nr = prime_num -1010\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_606_radian_degree", "language": "om", "prompt": "om2\nnote Write a function to convert degrees to radians.\nfn radian_degree degree long to f64\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_606_radian_degree.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = radian_degree 90\nret eq r 1.5707963267948966\nend\nfn tc_1 to bool\nr = radian_degree 60\nret eq r 1.0471975511965976\nend\nfn tc_2 to bool\nr = radian_degree 120\nret eq r 2.0943951023931953\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_608_bell_Number", "language": "om", "prompt": "om2\nnote Write an Omega function to find nth bell number.\nfn bell_Number n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_608_bell_Number.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = bell_Number 2\nret eq r 2\nend\nfn tc_1 to bool\nr = bell_Number 3\nret eq r 5\nend\nfn tc_2 to bool\nr = bell_Number 4\nret eq r 15\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_610_remove_kth_element", "language": "om", "prompt": "om2\nnote Write an Omega function which takes an array and returns an array with the same elements, but the k'th element removed.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn remove_kth_element list1 view long * L long res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_610_remove_kth_element.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 1\nput a0 2 2\nput a0 3 3\nput a0 4 4\nput a0 5 4\nput a0 6 5\nput a0 7 1\nres = new long 4096 0\nr = remove_kth_element a0 3 res\nif ne r 7\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 1\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 4\nret false\nend\nif ne get res 5 5\nret false\nend\nif ne get res 6 1\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 16 0\nput a0 0 0\nput a0 1 0\nput a0 2 1\nput a0 3 2\nput a0 4 3\nput a0 5 4\nput a0 6 4\nput a0 7 5\nput a0 8 6\nput a0 9 6\nput a0 10 6\nput a0 11 7\nput a0 12 8\nput a0 13 9\nput a0 14 4\nput a0 15 4\nres = new long 4096 0\nr = remove_kth_element a0 4 res\nif ne r 15\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 0\nret false\nend\nif ne get res 2 1\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 4\nret false\nend\nif ne get res 5 4\nret false\nend\nif ne get res 6 5\nret false\nend\nif ne get res 7 6\nret false\nend\nif ne get res 8 6\nret false\nend\nif ne get res 9 6\nret false\nend\nif ne get res 10 7\nret false\nend\nif ne get res 11 8\nret false\nend\nif ne get res 12 9\nret false\nend\nif ne get res 13 4\nret false\nend\nif ne get res 14 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 12 0\nput a0 0 10\nput a0 1 10\nput a0 2 15\nput a0 3 19\nput a0 4 18\nput a0 5 18\nput a0 6 17\nput a0 7 26\nput a0 8 26\nput a0 9 17\nput a0 10 18\nput a0 11 10\nres = new long 4096 0\nr = remove_kth_element a0 5 res\nif ne r 11\nret false\nend\nif ne get res 0 10\nret false\nend\nif ne get res 1 10\nret false\nend\nif ne get res 2 15\nret false\nend\nif ne get res 3 19\nret false\nend\nif ne get res 4 18\nret false\nend\nif ne get res 5 17\nret false\nend\nif ne get res 6 26\nret false\nend\nif ne get res 7 26\nret false\nend\nif ne get res 8 17\nret false\nend\nif ne get res 9 18\nret false\nend\nif ne get res 10 10\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_616_tuple_modulo", "language": "om", "prompt": "om2\nnote Write a function which takes two tuples of the same length and performs the element wise modulo.\nnote Omega name: test_tup1 is test_tup here.\nnote Omega name: test_tup2 is test_tu_ here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn tuple_modulo test_tup view long * test_tu_ view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_616_tuple_modulo.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 10\nput a0 1 4\nput a0 2 5\nput a0 3 6\na1 = new long 4 0\nput a1 0 5\nput a1 1 6\nput a1 2 7\nput a1 3 5\nres = new long 4096 0\nr = tuple_modulo a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 5\nret false\nend\nif ne get res 3 1\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 11\nput a0 1 5\nput a0 2 6\nput a0 3 7\na1 = new long 4 0\nput a1 0 6\nput a1 1 7\nput a1 2 8\nput a1 3 6\nres = new long 4096 0\nr = tuple_modulo a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 12\nput a0 1 6\nput a0 2 7\nput a0 3 8\na1 = new long 4 0\nput a1 0 7\nput a1 1 8\nput a1 2 9\nput a1 3 7\nres = new long 4096 0\nr = tuple_modulo a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 6\nret false\nend\nif ne get res 2 7\nret false\nend\nif ne get res 3 1\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_617_min_Jumps", "language": "om", "prompt": "om2\nnote Write a function to check for the number of jumps required of given length to reach a point of form (d, 0) from origin in a 2d plane.\nfn min_Jumps steps view long * d long to f64\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_617_min_Jumps.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 2 0\nput a0 0 3\nput a0 1 4\nr = min_Jumps a0 11\nret eq r 3.5\nend\nfn tc_1 to bool\na0 = new long 2 0\nput a0 0 3\nput a0 1 4\nr = min_Jumps a0 0\nret eq r 0.0\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 11\nput a0 1 14\nr = min_Jumps a0 11\nret eq r 1.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_618_div_list", "language": "om", "prompt": "om2\nnote Write a function to divide two lists element wise.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn div_list nums1 view long * nums2 view long * res edit f64 * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_618_div_list.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 4\nput a0 1 5\nput a0 2 6\na1 = new long 3 0\nput a1 0 1\nput a1 1 2\nput a1 2 3\nres = new f64 4096 0.0\nr = div_list a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 4.0\nret false\nend\nif ne get res 1 2.5\nret false\nend\nif ne get res 2 2.0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 2 0\nput a0 0 3\nput a0 1 2\na1 = new long 2 0\nput a1 0 1\nput a1 1 4\nres = new f64 4096 0.0\nr = div_list a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 3.0\nret false\nend\nif ne get res 1 0.5\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 90\nput a0 1 120\na1 = new long 2 0\nput a1 0 50\nput a1 1 70\nres = new f64 4096 0.0\nr = div_list a0 a1 res\nif ne r 2\nret false\nend\nif ne get res 0 1.8\nret false\nend\nif ne get res 1 1.7142857142857142\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_619_move_num", "language": "om", "prompt": "om2\nnote Write a function to move all the numbers to the end of the given string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn move_num test_str view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_619_move_num.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"I1love143you55three3000thousand\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = move_num t0_0 res\nif ne r 31\nret false\nend\nif ne get res 0 73\nret false\nend\nif ne get res 1 108\nret false\nend\nif ne get res 2 111\nret false\nend\nif ne get res 3 118\nret false\nend\nif ne get res 4 101\nret false\nend\nif ne get res 5 121\nret false\nend\nif ne get res 6 111\nret false\nend\nif ne get res 7 117\nret false\nend\nif ne get res 8 116\nret false\nend\nif ne get res 9 104\nret false\nend\nif ne get res 10 114\nret false\nend\nif ne get res 11 101\nret false\nend\nif ne get res 12 101\nret false\nend\nif ne get res 13 116\nret false\nend\nif ne get res 14 104\nret false\nend\nif ne get res 15 111\nret false\nend\nif ne get res 16 117\nret false\nend\nif ne get res 17 115\nret false\nend\nif ne get res 18 97\nret false\nend\nif ne get res 19 110\nret false\nend\nif ne get res 20 100\nret false\nend\nif ne get res 21 49\nret false\nend\nif ne get res 22 49\nret false\nend\nif ne get res 23 52\nret false\nend\nif ne get res 24 51\nret false\nend\nif ne get res 25 53\nret false\nend\nif ne get res 26 53\nret false\nend\nif ne get res 27 51\nret false\nend\nif ne get res 28 48\nret false\nend\nif ne get res 29 48\nret false\nend\nif ne get res 30 48\nret false\nend\nret true\nend\ntext t1_0 \"Avengers124Assemble\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = move_num t1_0 res\nif ne r 19\nret false\nend\nif ne get res 0 65\nret false\nend\nif ne get res 1 118\nret false\nend\nif ne get res 2 101\nret false\nend\nif ne get res 3 110\nret false\nend\nif ne get res 4 103\nret false\nend\nif ne get res 5 101\nret false\nend\nif ne get res 6 114\nret false\nend\nif ne get res 7 115\nret false\nend\nif ne get res 8 65\nret false\nend\nif ne get res 9 115\nret false\nend\nif ne get res 10 115\nret false\nend\nif ne get res 11 101\nret false\nend\nif ne get res 12 109\nret false\nend\nif ne get res 13 98\nret false\nend\nif ne get res 14 108\nret false\nend\nif ne get res 15 101\nret false\nend\nif ne get res 16 49\nret false\nend\nif ne get res 17 50\nret false\nend\nif ne get res 18 52\nret false\nend\nret true\nend\ntext t2_0 \"Its11our12path13to14see15things16do17things\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = move_num t2_0 res\nif ne r 43\nret false\nend\nif ne get res 0 73\nret false\nend\nif ne get res 1 116\nret false\nend\nif ne get res 2 115\nret false\nend\nif ne get res 3 111\nret false\nend\nif ne get res 4 117\nret false\nend\nif ne get res 5 114\nret false\nend\nif ne get res 6 112\nret false\nend\nif ne get res 7 97\nret false\nend\nif ne get res 8 116\nret false\nend\nif ne get res 9 104\nret false\nend\nif ne get res 10 116\nret false\nend\nif ne get res 11 111\nret false\nend\nif ne get res 12 115\nret false\nend\nif ne get res 13 101\nret false\nend\nif ne get res 14 101\nret false\nend\nif ne get res 15 116\nret false\nend\nif ne get res 16 104\nret false\nend\nif ne get res 17 105\nret false\nend\nif ne get res 18 110\nret false\nend\nif ne get res 19 103\nret false\nend\nif ne get res 20 115\nret false\nend\nif ne get res 21 100\nret false\nend\nif ne get res 22 111\nret false\nend\nif ne get res 23 116\nret false\nend\nif ne get res 24 104\nret false\nend\nif ne get res 25 105\nret false\nend\nif ne get res 26 110\nret false\nend\nif ne get res 27 103\nret false\nend\nif ne get res 28 115\nret false\nend\nif ne get res 29 49\nret false\nend\nif ne get res 30 49\nret false\nend\nif ne get res 31 49\nret false\nend\nif ne get res 32 50\nret false\nend\nif ne get res 33 49\nret false\nend\nif ne get res 34 51\nret false\nend\nif ne get res 35 49\nret false\nend\nif ne get res 36 52\nret false\nend\nif ne get res 37 49\nret false\nend\nif ne get res 38 53\nret false\nend\nif ne get res 39 49\nret false\nend\nif ne get res 40 54\nret false\nend\nif ne get res 41 49\nret false\nend\nif ne get res 42 55\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_622_get_median", "language": "om", "prompt": "om2\nnote Write a function to find the median of two sorted lists of same size.\nfn get_median arr1 view long * arr2 view long * n long to f64\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_622_get_median.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 12\nput a0 2 15\nput a0 3 26\nput a0 4 38\na1 = new long 5 0\nput a1 0 2\nput a1 1 13\nput a1 2 17\nput a1 3 30\nput a1 4 45\nr = get_median a0 a1 5\nret eq r 16.0\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 2\nput a0 1 4\nput a0 2 8\nput a0 3 9\na1 = new long 4 0\nput a1 0 7\nput a1 1 13\nput a1 2 19\nput a1 3 28\nr = get_median a0 a1 4\nret eq r 8.5\nend\nfn tc_2 to bool\na0 = new long 6 0\nput a0 0 3\nput a0 1 6\nput a0 2 14\nput a0 3 23\nput a0 4 36\nput a0 5 42\na1 = new long 6 0\nput a1 0 2\nput a1 1 18\nput a1 2 27\nput a1 3 39\nput a1 4 49\nput a1 5 55\nr = get_median a0 a1 6\nret eq r 25.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_623_nth_nums", "language": "om", "prompt": "om2\nnote Write a function to compute the n-th power of each number in an array.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn nth_nums nums view long * n long res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_623_nth_nums.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nput a0 9 10\nres = new long 4096 0\nr = nth_nums a0 2 res\nif ne r 10\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 9\nret false\nend\nif ne get res 3 16\nret false\nend\nif ne get res 4 25\nret false\nend\nif ne get res 5 36\nret false\nend\nif ne get res 6 49\nret false\nend\nif ne get res 7 64\nret false\nend\nif ne get res 8 81\nret false\nend\nif ne get res 9 100\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 10\nput a0 1 20\nput a0 2 30\nres = new long 4096 0\nr = nth_nums a0 3 res\nif ne r 3\nret false\nend\nif ne get res 0 1000\nret false\nend\nif ne get res 1 8000\nret false\nend\nif ne get res 2 27000\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 12\nput a0 1 15\nres = new long 4096 0\nr = nth_nums a0 5 res\nif ne r 2\nret false\nend\nif ne get res 0 248832\nret false\nend\nif ne get res 1 759375\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_624_is_upper", "language": "om", "prompt": "om2\nnote Write an Omega function to convert a given string to uppercase.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn is_upper string view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_624_is_upper.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"person\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = is_upper t0_0 res\nif ne r 6\nret false\nend\nif ne get res 0 80\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 82\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 78\nret false\nend\nret true\nend\ntext t1_0 \"final\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = is_upper t1_0 res\nif ne r 5\nret false\nend\nif ne get res 0 70\nret false\nend\nif ne get res 1 73\nret false\nend\nif ne get res 2 78\nret false\nend\nif ne get res 3 65\nret false\nend\nif ne get res 4 76\nret false\nend\nret true\nend\ntext t2_0 \"Valid\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = is_upper t2_0 res\nif ne r 5\nret false\nend\nif ne get res 0 86\nret false\nend\nif ne get res 1 65\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 73\nret false\nend\nif ne get res 4 68\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_625_swap_List", "language": "om", "prompt": "om2\nnote Write an Omega function to interchange the first and last element in a given array.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn swap_List newList view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_625_swap_List.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nres = new long 4096 0\nr = swap_List a0 res\nif ne r 3\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 1\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 4\nres = new long 4096 0\nr = swap_List a0 res\nif ne r 5\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 4\nput a0 1 5\nput a0 2 6\nres = new long 4096 0\nr = swap_List a0 res\nif ne r 3\nret false\nend\nif ne get res 0 6\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 4\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_627_find_First_Missing", "language": "om", "prompt": "om2\nnote Write an Omega function to find the smallest missing number from a sorted array of natural numbers.\nfn find_First_Missing array view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_627_find_First_Missing.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 0\nput a0 1 1\nput a0 2 2\nput a0 3 3\nr = find_First_Missing a0\nret eq r 4\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 0\nput a0 1 1\nput a0 2 2\nput a0 3 6\nput a0 4 9\nr = find_First_Missing a0\nret eq r 3\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 2\nput a0 1 3\nput a0 2 5\nput a0 3 8\nput a0 4 9\nr = find_First_Missing a0\nret eq r 0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_628_replace_spaces", "language": "om", "prompt": "om2\nnote Write a function to replace all spaces in the given string with '%20'.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn replace_spaces string view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_628_replace_spaces.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"My Name is Dawood\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = replace_spaces t0_0 res\nif ne r 23\nret false\nend\nif ne get res 0 77\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 37\nret false\nend\nif ne get res 3 50\nret false\nend\nif ne get res 4 48\nret false\nend\nif ne get res 5 78\nret false\nend\nif ne get res 6 97\nret false\nend\nif ne get res 7 109\nret false\nend\nif ne get res 8 101\nret false\nend\nif ne get res 9 37\nret false\nend\nif ne get res 10 50\nret false\nend\nif ne get res 11 48\nret false\nend\nif ne get res 12 105\nret false\nend\nif ne get res 13 115\nret false\nend\nif ne get res 14 37\nret false\nend\nif ne get res 15 50\nret false\nend\nif ne get res 16 48\nret false\nend\nif ne get res 17 68\nret false\nend\nif ne get res 18 97\nret false\nend\nif ne get res 19 119\nret false\nend\nif ne get res 20 111\nret false\nend\nif ne get res 21 111\nret false\nend\nif ne get res 22 100\nret false\nend\nret true\nend\ntext t1_0 \"I am a Programmer\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = replace_spaces t1_0 res\nif ne r 23\nret false\nend\nif ne get res 0 73\nret false\nend\nif ne get res 1 37\nret false\nend\nif ne get res 2 50\nret false\nend\nif ne get res 3 48\nret false\nend\nif ne get res 4 97\nret false\nend\nif ne get res 5 109\nret false\nend\nif ne get res 6 37\nret false\nend\nif ne get res 7 50\nret false\nend\nif ne get res 8 48\nret false\nend\nif ne get res 9 97\nret false\nend\nif ne get res 10 37\nret false\nend\nif ne get res 11 50\nret false\nend\nif ne get res 12 48\nret false\nend\nif ne get res 13 80\nret false\nend\nif ne get res 14 114\nret false\nend\nif ne get res 15 111\nret false\nend\nif ne get res 16 103\nret false\nend\nif ne get res 17 114\nret false\nend\nif ne get res 18 97\nret false\nend\nif ne get res 19 109\nret false\nend\nif ne get res 20 109\nret false\nend\nif ne get res 21 101\nret false\nend\nif ne get res 22 114\nret false\nend\nret true\nend\ntext t2_0 \"I love Coding\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = replace_spaces t2_0 res\nif ne r 17\nret false\nend\nif ne get res 0 73\nret false\nend\nif ne get res 1 37\nret false\nend\nif ne get res 2 50\nret false\nend\nif ne get res 3 48\nret false\nend\nif ne get res 4 108\nret false\nend\nif ne get res 5 111\nret false\nend\nif ne get res 6 118\nret false\nend\nif ne get res 7 101\nret false\nend\nif ne get res 8 37\nret false\nend\nif ne get res 9 50\nret false\nend\nif ne get res 10 48\nret false\nend\nif ne get res 11 67\nret false\nend\nif ne get res 12 111\nret false\nend\nif ne get res 13 100\nret false\nend\nif ne get res 14 105\nret false\nend\nif ne get res 15 110\nret false\nend\nif ne get res 16 103\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_629_Split", "language": "om", "prompt": "om2\nnote Write an Omega function to find even numbers from an array of numbers.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn Split list view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_629_Split.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nres = new long 4096 0\nr = Split a0 res\nif ne r 2\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 4\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 7 0\nput a0 0 4\nput a0 1 5\nput a0 2 6\nput a0 3 7\nput a0 4 8\nput a0 5 0\nput a0 6 1\nres = new long 4096 0\nr = Split a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 6\nret false\nend\nif ne get res 2 8\nret false\nend\nif ne get res 3 0\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 8\nput a0 1 12\nput a0 2 15\nput a0 3 19\nres = new long 4096 0\nr = Split a0 res\nif ne r 2\nret false\nend\nif ne get res 0 8\nret false\nend\nif ne get res 1 12\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_631_replace_spaces", "language": "om", "prompt": "om2\nnote Write a function to replace whitespaces with an underscore and vice versa in a given string.\nnote Omega name: text is text_ here.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn replace_spaces text_ view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_631_replace_spaces.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"Jumanji The Jungle\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = replace_spaces t0_0 res\nif ne r 18\nret false\nend\nif ne get res 0 74\nret false\nend\nif ne get res 1 117\nret false\nend\nif ne get res 2 109\nret false\nend\nif ne get res 3 97\nret false\nend\nif ne get res 4 110\nret false\nend\nif ne get res 5 106\nret false\nend\nif ne get res 6 105\nret false\nend\nif ne get res 7 95\nret false\nend\nif ne get res 8 84\nret false\nend\nif ne get res 9 104\nret false\nend\nif ne get res 10 101\nret false\nend\nif ne get res 11 95\nret false\nend\nif ne get res 12 74\nret false\nend\nif ne get res 13 117\nret false\nend\nif ne get res 14 110\nret false\nend\nif ne get res 15 103\nret false\nend\nif ne get res 16 108\nret false\nend\nif ne get res 17 101\nret false\nend\nret true\nend\ntext t1_0 \"The_Avengers\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = replace_spaces t1_0 res\nif ne r 12\nret false\nend\nif ne get res 0 84\nret false\nend\nif ne get res 1 104\nret false\nend\nif ne get res 2 101\nret false\nend\nif ne get res 3 32\nret false\nend\nif ne get res 4 65\nret false\nend\nif ne get res 5 118\nret false\nend\nif ne get res 6 101\nret false\nend\nif ne get res 7 110\nret false\nend\nif ne get res 8 103\nret false\nend\nif ne get res 9 101\nret false\nend\nif ne get res 10 114\nret false\nend\nif ne get res 11 115\nret false\nend\nret true\nend\ntext t2_0 \"Fast and Furious\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = replace_spaces t2_0 res\nif ne r 16\nret false\nend\nif ne get res 0 70\nret false\nend\nif ne get res 1 97\nret false\nend\nif ne get res 2 115\nret false\nend\nif ne get res 3 116\nret false\nend\nif ne get res 4 95\nret false\nend\nif ne get res 5 97\nret false\nend\nif ne get res 6 110\nret false\nend\nif ne get res 7 100\nret false\nend\nif ne get res 8 95\nret false\nend\nif ne get res 9 70\nret false\nend\nif ne get res 10 117\nret false\nend\nif ne get res 11 114\nret false\nend\nif ne get res 12 105\nret false\nend\nif ne get res 13 111\nret false\nend\nif ne get res 14 117\nret false\nend\nif ne get res 15 115\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_632_move_zero", "language": "om", "prompt": "om2\nnote Write an Omega function to move all zeroes to the end of the given array.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn move_zero num_list view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_632_move_zero.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 0\nput a0 2 2\nput a0 3 0\nput a0 4 3\nput a0 5 4\nres = new long 4096 0\nr = move_zero a0 res\nif ne r 6\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 0\nret false\nend\nif ne get res 5 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 9 0\nput a0 0 2\nput a0 1 3\nput a0 2 2\nput a0 3 0\nput a0 4 0\nput a0 5 4\nput a0 6 0\nput a0 7 5\nput a0 8 0\nres = new long 4096 0\nr = move_zero a0 res\nif ne r 9\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 5\nret false\nend\nif ne get res 5 0\nret false\nend\nif ne get res 6 0\nret false\nend\nif ne get res 7 0\nret false\nend\nif ne get res 8 0\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 0\nput a0 1 1\nput a0 2 0\nput a0 3 1\nput a0 4 1\nres = new long 4096 0\nr = move_zero a0 res\nif ne r 5\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 1\nret false\nend\nif ne get res 2 1\nret false\nend\nif ne get res 3 0\nret false\nend\nif ne get res 4 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_633_pair_xor_Sum", "language": "om", "prompt": "om2\nnote Write an Omega function to find the sum of xor of all pairs of numbers in the given array.\nfn pair_xor_Sum arr view long * n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_633_pair_xor_Sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 5\nput a0 1 9\nput a0 2 7\nput a0 3 6\nr = pair_xor_Sum a0 4\nret eq r 47\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 7\nput a0 1 3\nput a0 2 5\nr = pair_xor_Sum a0 3\nret eq r 12\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 7\nput a0 1 3\nr = pair_xor_Sum a0 2\nret eq r 4\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_635_heap_sort", "language": "om", "prompt": "om2\nnote Write a function to sort the given array.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn heap_sort iterable view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_635_heap_sort.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 3\nput a0 2 5\nput a0 3 7\nput a0 4 9\nput a0 5 2\nput a0 6 4\nput a0 7 6\nput a0 8 8\nput a0 9 0\nres = new long 4096 0\nr = heap_sort a0 res\nif ne r 10\nret false\nend\nif ne get res 0 0\nret false\nend\nif ne get res 1 1\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 4\nret false\nend\nif ne get res 5 5\nret false\nend\nif ne get res 6 6\nret false\nend\nif ne get res 7 7\nret false\nend\nif ne get res 8 8\nret false\nend\nif ne get res 9 9\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 9 0\nput a0 0 25\nput a0 1 35\nput a0 2 22\nput a0 3 85\nput a0 4 14\nput a0 5 65\nput a0 6 75\nput a0 7 25\nput a0 8 58\nres = new long 4096 0\nr = heap_sort a0 res\nif ne r 9\nret false\nend\nif ne get res 0 14\nret false\nend\nif ne get res 1 22\nret false\nend\nif ne get res 2 25\nret false\nend\nif ne get res 3 25\nret false\nend\nif ne get res 4 35\nret false\nend\nif ne get res 5 58\nret false\nend\nif ne get res 6 65\nret false\nend\nif ne get res 7 75\nret false\nend\nif ne get res 8 85\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 7\nput a0 1 1\nput a0 2 9\nput a0 3 5\nres = new long 4096 0\nr = heap_sort a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 7\nret false\nend\nif ne get res 3 9\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_637_noprofit_noloss", "language": "om", "prompt": "om2\nnote Write a function to check whether the given amount has no profit and no loss\nnote Omega name: actual_cost is actual_c here.\nnote Omega name: sale_amount is sale_amo here.\nfn noprofit_noloss actual_c long sale_amo long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_637_noprofit_noloss.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = noprofit_noloss 1500 1200\nret eq r false\nend\nfn tc_1 to bool\nr = noprofit_noloss 100 100\nret eq r true\nend\nfn tc_2 to bool\nr = noprofit_noloss 2000 5000\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_638_wind_chill", "language": "om", "prompt": "om2\nnote Write a function to calculate the wind chill index rounded to the next integer given the wind velocity in km/h and a temperature in celsius.\nfn wind_chill v long t long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_638_wind_chill.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = wind_chill 120 35\nret eq r 40\nend\nfn tc_1 to bool\nr = wind_chill 40 20\nret eq r 19\nend\nfn tc_2 to bool\nr = wind_chill 10 8\nret eq r 6\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_641_is_nonagonal", "language": "om", "prompt": "om2\nnote Write a function to find the nth nonagonal number.\nfn is_nonagonal n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_641_is_nonagonal.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_nonagonal 10\nret eq r 325\nend\nfn tc_1 to bool\nr = is_nonagonal 15\nret eq r 750\nend\nfn tc_2 to bool\nr = is_nonagonal 18\nret eq r 1089\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_643_text_match_wordz_middle", "language": "om", "prompt": "om2\nnote Write a function that checks if a strings contains 'z', except at the start and end of the word.\nnote Omega name: text is text_ here.\nfn text_match_wordz_middle text_ view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_643_text_match_wordz_middle.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"pythonzabc.\"\nfn tc_0 to bool\nr = text_match_wordz_middle t0_0\nret eq r true\nend\ntext t1_0 \"zxyabc.\"\nfn tc_1 to bool\nr = text_match_wordz_middle t1_0\nret eq r false\nend\ntext t2_0 \" lang .\"\nfn tc_2 to bool\nr = text_match_wordz_middle t2_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_644_reverse_Array_Upto_K", "language": "om", "prompt": "om2\nnote Write an Omega function to reverse an array upto a given position.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn reverse_Array_Upto_K input view long * k long res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_644_reverse_Array_Upto_K.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nres = new long 4096 0\nr = reverse_Array_Upto_K a0 4 res\nif ne r 6\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 1\nret false\nend\nif ne get res 4 5\nret false\nend\nif ne get res 5 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 5\nput a0 2 6\nput a0 3 7\nres = new long 4096 0\nr = reverse_Array_Upto_K a0 2 res\nif ne r 4\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 7\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 9\nput a0 1 8\nput a0 2 7\nput a0 3 6\nput a0 4 5\nres = new long 4096 0\nr = reverse_Array_Upto_K a0 3 res\nif ne r 5\nret false\nend\nif ne get res 0 7\nret false\nend\nif ne get res 1 8\nret false\nend\nif ne get res 2 9\nret false\nend\nif ne get res 3 6\nret false\nend\nif ne get res 4 5\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_723_count_same_pair", "language": "om", "prompt": "om2\nnote The input is defined as two lists of the same length. Write a function to count indices where the lists have the same values.\nfn count_same_pair nums1 view long * nums2 view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_723_count_same_pair.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\na1 = new long 8 0\nput a1 0 2\nput a1 1 2\nput a1 2 3\nput a1 3 1\nput a1 4 2\nput a1 5 6\nput a1 6 7\nput a1 7 9\nr = count_same_pair a0 a1\nret eq r 4\nend\nfn tc_1 to bool\na0 = new long 13 0\nput a0 0 0\nput a0 1 1\nput a0 2 2\nput a0 3 -1\nput a0 4 -5\nput a0 5 6\nput a0 6 0\nput a0 7 -3\nput a0 8 -2\nput a0 9 3\nput a0 10 4\nput a0 11 6\nput a0 12 8\na1 = new long 13 0\nput a1 0 2\nput a1 1 1\nput a1 2 2\nput a1 3 -1\nput a1 4 -5\nput a1 5 6\nput a1 6 4\nput a1 7 -3\nput a1 8 -2\nput a1 9 3\nput a1 10 4\nput a1 11 6\nput a1 12 8\nr = count_same_pair a0 a1\nret eq r 11\nend\nfn tc_2 to bool\na0 = new long 9 0\nput a0 0 2\nput a0 1 4\nput a0 2 -6\nput a0 3 -9\nput a0 4 11\nput a0 5 -12\nput a0 6 14\nput a0 7 -5\nput a0 8 17\na1 = new long 13 0\nput a1 0 2\nput a1 1 1\nput a1 2 2\nput a1 3 -1\nput a1 4 -5\nput a1 5 6\nput a1 6 4\nput a1 7 -3\nput a1 8 -2\nput a1 9 3\nput a1 10 4\nput a1 11 6\nput a1 12 8\nr = count_same_pair a0 a1\nret eq r 1\nend\nfn tc_3 to bool\na0 = new long 4 0\nput a0 0 0\nput a0 1 1\nput a0 2 1\nput a0 3 2\na1 = new long 4 0\nput a1 0 0\nput a1 1 1\nput a1 2 2\nput a1 3 2\nr = count_same_pair a0 a1\nret eq r 3\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_724_power_base_sum", "language": "om", "prompt": "om2\nnote Write a function that takes base and power as arguments and calculate the sum of all digits of the base to the specified power.\nfn power_base_sum base long power long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_724_power_base_sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = power_base_sum 2 100\nret eq r 115\nend\nfn tc_1 to bool\nr = power_base_sum 8 10\nret eq r 37\nend\nfn tc_2 to bool\nr = power_base_sum 8 15\nret eq r 62\nend\nfn tc_3 to bool\nr = power_base_sum 3 3\nret eq r 9\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_726_multiply_elements", "language": "om", "prompt": "om2\nnote Write a function that takes as input an array of numbers (t_1,...,t_{N+1}) and returns an array of length N where the i-th element of the array is equal to t_i * t_{i+1}.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn multiply_elements test_tup view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_726_multiply_elements.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 5\nput a0 2 7\nput a0 3 8\nput a0 4 10\nres = new long 4096 0\nr = multiply_elements a0 res\nif ne r 4\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 35\nret false\nend\nif ne get res 2 56\nret false\nend\nif ne get res 3 80\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 2\nput a0 1 4\nput a0 2 5\nput a0 3 6\nput a0 4 7\nres = new long 4096 0\nr = multiply_elements a0 res\nif ne r 4\nret false\nend\nif ne get res 0 8\nret false\nend\nif ne get res 1 20\nret false\nend\nif ne get res 2 30\nret false\nend\nif ne get res 3 42\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 12\nput a0 1 13\nput a0 2 14\nput a0 3 9\nput a0 4 15\nres = new long 4096 0\nr = multiply_elements a0 res\nif ne r 4\nret false\nend\nif ne get res 0 156\nret false\nend\nif ne get res 1 182\nret false\nend\nif ne get res 2 126\nret false\nend\nif ne get res 3 135\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nput a0 0 12\nres = new long 4096 0\nr = multiply_elements a0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_728_sum_list", "language": "om", "prompt": "om2\nnote Write a function takes as input two lists [a_1,...,a_n], [b_1,...,b_n] and returns [a_1+b_1,...,a_n+b_n].\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn sum_list lst1 view long * lst2 view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_728_sum_list.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 10\nput a0 1 20\nput a0 2 30\na1 = new long 3 0\nput a1 0 15\nput a1 1 25\nput a1 2 35\nres = new long 4096 0\nr = sum_list a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 25\nret false\nend\nif ne get res 1 45\nret false\nend\nif ne get res 2 65\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\na1 = new long 3 0\nput a1 0 5\nput a1 1 6\nput a1 2 7\nres = new long 4096 0\nr = sum_list a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 6\nret false\nend\nif ne get res 1 8\nret false\nend\nif ne get res 2 10\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 15\nput a0 1 20\nput a0 2 30\na1 = new long 3 0\nput a1 0 15\nput a1 1 45\nput a1 2 75\nres = new long 4096 0\nr = sum_list a0 a1 res\nif ne r 3\nret false\nend\nif ne get res 0 30\nret false\nend\nif ne get res 1 65\nret false\nend\nif ne get res 2 105\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_731_lateralsurface_cone", "language": "om", "prompt": "om2\nnote Write a function to find the lateral surface area of a cone given radius r and the height h.\nnote Omega name: r is r_ here.\nfn lateralsurface_cone r_ long h long to f64\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_731_lateralsurface_cone.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = lateralsurface_cone 5 12\nret eq r 204.20352248333654\nend\nfn tc_1 to bool\nr = lateralsurface_cone 10 15\nret eq r 566.3586699569488\nend\nfn tc_2 to bool\nr = lateralsurface_cone 19 17\nret eq r 1521.8090132193388\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_732_replace_specialchar", "language": "om", "prompt": "om2\nnote Write a function to replace all occurrences of spaces, commas, or dots with a colon.\nnote Omega name: text is text_ here.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn replace_specialchar text_ view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_732_replace_specialchar.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"Python language, Programming language.\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = replace_specialchar t0_0 res\nif ne r 38\nret false\nend\nif ne get res 0 80\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 116\nret false\nend\nif ne get res 3 104\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 110\nret false\nend\nif ne get res 6 58\nret false\nend\nif ne get res 7 108\nret false\nend\nif ne get res 8 97\nret false\nend\nif ne get res 9 110\nret false\nend\nif ne get res 10 103\nret false\nend\nif ne get res 11 117\nret false\nend\nif ne get res 12 97\nret false\nend\nif ne get res 13 103\nret false\nend\nif ne get res 14 101\nret false\nend\nif ne get res 15 58\nret false\nend\nif ne get res 16 58\nret false\nend\nif ne get res 17 80\nret false\nend\nif ne get res 18 114\nret false\nend\nif ne get res 19 111\nret false\nend\nif ne get res 20 103\nret false\nend\nif ne get res 21 114\nret false\nend\nif ne get res 22 97\nret false\nend\nif ne get res 23 109\nret false\nend\nif ne get res 24 109\nret false\nend\nif ne get res 25 105\nret false\nend\nif ne get res 26 110\nret false\nend\nif ne get res 27 103\nret false\nend\nif ne get res 28 58\nret false\nend\nif ne get res 29 108\nret false\nend\nif ne get res 30 97\nret false\nend\nif ne get res 31 110\nret false\nend\nif ne get res 32 103\nret false\nend\nif ne get res 33 117\nret false\nend\nif ne get res 34 97\nret false\nend\nif ne get res 35 103\nret false\nend\nif ne get res 36 101\nret false\nend\nif ne get res 37 58\nret false\nend\nret true\nend\ntext t1_0 \"a b c,d e f\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = replace_specialchar t1_0 res\nif ne r 11\nret false\nend\nif ne get res 0 97\nret false\nend\nif ne get res 1 58\nret false\nend\nif ne get res 2 98\nret false\nend\nif ne get res 3 58\nret false\nend\nif ne get res 4 99\nret false\nend\nif ne get res 5 58\nret false\nend\nif ne get res 6 100\nret false\nend\nif ne get res 7 58\nret false\nend\nif ne get res 8 101\nret false\nend\nif ne get res 9 58\nret false\nend\nif ne get res 10 102\nret false\nend\nret true\nend\ntext t2_0 \"ram reshma,ram rahim\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = replace_specialchar t2_0 res\nif ne r 20\nret false\nend\nif ne get res 0 114\nret false\nend\nif ne get res 1 97\nret false\nend\nif ne get res 2 109\nret false\nend\nif ne get res 3 58\nret false\nend\nif ne get res 4 114\nret false\nend\nif ne get res 5 101\nret false\nend\nif ne get res 6 115\nret false\nend\nif ne get res 7 104\nret false\nend\nif ne get res 8 109\nret false\nend\nif ne get res 9 97\nret false\nend\nif ne get res 10 58\nret false\nend\nif ne get res 11 114\nret false\nend\nif ne get res 12 97\nret false\nend\nif ne get res 13 109\nret false\nend\nif ne get res 14 58\nret false\nend\nif ne get res 15 114\nret false\nend\nif ne get res 16 97\nret false\nend\nif ne get res 17 104\nret false\nend\nif ne get res 18 105\nret false\nend\nif ne get res 19 109\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_733_find_first_occurrence", "language": "om", "prompt": "om2\nnote Write a function to find the index of the first occurrence of a given number in a sorted array.\nfn find_first_occurrence A view long * x long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_733_find_first_occurrence.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 10 0\nput a0 0 2\nput a0 1 5\nput a0 2 5\nput a0 3 5\nput a0 4 6\nput a0 5 6\nput a0 6 8\nput a0 7 9\nput a0 8 9\nput a0 9 9\nr = find_first_occurrence a0 5\nret eq r 1\nend\nfn tc_1 to bool\na0 = new long 10 0\nput a0 0 2\nput a0 1 3\nput a0 2 5\nput a0 3 5\nput a0 4 6\nput a0 5 6\nput a0 6 8\nput a0 7 9\nput a0 8 9\nput a0 9 9\nr = find_first_occurrence a0 5\nret eq r 2\nend\nfn tc_2 to bool\na0 = new long 10 0\nput a0 0 2\nput a0 1 4\nput a0 2 1\nput a0 3 5\nput a0 4 6\nput a0 5 6\nput a0 6 8\nput a0 7 9\nput a0 8 9\nput a0 9 9\nr = find_first_occurrence a0 6\nret eq r 4\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_734_sum_Of_Subarray_Prod", "language": "om", "prompt": "om2\nnote Write an Omega function to find sum of products of all possible sublists of a given array. https://www.geeksforgeeks.org/sum-of-products-of-all-possible-subarrays/\nfn sum_Of_Subarray_Prod arr view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_734_sum_Of_Subarray_Prod.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = sum_Of_Subarray_Prod a0\nret eq r 20\nend\nfn tc_1 to bool\na0 = new long 2 0\nput a0 0 1\nput a0 1 2\nr = sum_Of_Subarray_Prod a0\nret eq r 5\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nr = sum_Of_Subarray_Prod a0\nret eq r 84\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_735_toggle_middle_bits", "language": "om", "prompt": "om2\nnote Write an Omega function to toggle bits of the number except the first and the last bit. https://www.geeksforgeeks.org/toggle-bits-number-expect-first-last-bits/\nfn toggle_middle_bits n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_735_toggle_middle_bits.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = toggle_middle_bits 9\nret eq r 15\nend\nfn tc_1 to bool\nr = toggle_middle_bits 10\nret eq r 12\nend\nfn tc_2 to bool\nr = toggle_middle_bits 11\nret eq r 13\nend\nfn tc_3 to bool\nr = toggle_middle_bits 65\nret eq r 127\nend\nfn tc_4 to bool\nr = toggle_middle_bits 77\nret eq r 115\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_736_left_insertion", "language": "om", "prompt": "om2\nnote Write a function to locate the left insertion point for a specified value in sorted order. https://www.w3resource.com/Omega-exercises/data-structures-and-algorithms/Omega-data-structure-exercise-24.php\nfn left_insertion a view long * x long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_736_left_insertion.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 5\nr = left_insertion a0 6\nret eq r 4\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 5\nr = left_insertion a0 3\nret eq r 2\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 5\nr = left_insertion a0 7\nret eq r 4\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_737_check_str", "language": "om", "prompt": "om2\nnote Write a function to check whether the given string is starting with a vowel or not using regex.\nfn check_str string view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_737_check_str.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"annie\"\nfn tc_0 to bool\nr = check_str t0_0\nret eq r true\nend\ntext t1_0 \"dawood\"\nfn tc_1 to bool\nr = check_str t1_0\nret eq r false\nend\ntext t2_0 \"Else\"\nfn tc_2 to bool\nr = check_str t2_0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_738_geometric_sum", "language": "om", "prompt": "om2\nnote Write a function to calculate the geometric sum of n-1. https://www.w3resource.com/Omega-exercises/data-structures-and-algorithms/Omega-recursion-exercise-9.php\nfn geometric_sum n long to f64\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_738_geometric_sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = geometric_sum 7\nret eq r 1.9921875\nend\nfn tc_1 to bool\nr = geometric_sum 4\nret eq r 1.9375\nend\nfn tc_2 to bool\nr = geometric_sum 8\nret eq r 1.99609375\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_739_find_Index", "language": "om", "prompt": "om2\nnote Write an Omega function to find the index of smallest triangular number with n digits. https://www.geeksforgeeks.org/index-of-smallest-triangular-number-with-n-digits/\nfn find_Index n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_739_find_Index.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = find_Index 2\nret eq r 4\nend\nfn tc_1 to bool\nr = find_Index 3\nret eq r 14\nend\nfn tc_2 to bool\nr = find_Index 4\nret eq r 45\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_741_all_Characters_Same", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether all the characters are same or not.\nfn all_Characters_Same s view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_741_all_Characters_Same.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"python\"\nfn tc_0 to bool\nr = all_Characters_Same t0_0\nret eq r false\nend\ntext t1_0 \"aaa\"\nfn tc_1 to bool\nr = all_Characters_Same t1_0\nret eq r true\nend\ntext t2_0 \"data\"\nfn tc_2 to bool\nr = all_Characters_Same t2_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_742_area_tetrahedron", "language": "om", "prompt": "om2\nnote Write a function to caluclate the area of a tetrahedron.\nfn area_tetrahedron side long to f64\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_742_area_tetrahedron.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = area_tetrahedron 3\nret eq r 15.588457268119894\nend\nfn tc_1 to bool\nr = area_tetrahedron 20\nret eq r 692.8203230275509\nend\nfn tc_2 to bool\nr = area_tetrahedron 10\nret eq r 173.20508075688772\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_743_rotate_right", "language": "om", "prompt": "om2\nnote Write a function to rotate a given array by specified number of items to the right direction. https://www.geeksforgeeks.org/Omega-program-right-rotate-array-n/\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rotate_right list view long * m long res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_743_rotate_right.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nput a0 9 10\nres = new long 4096 0\nr = rotate_right a0 3 res\nif ne r 10\nret false\nend\nif ne get res 0 8\nret false\nend\nif ne get res 1 9\nret false\nend\nif ne get res 2 10\nret false\nend\nif ne get res 3 1\nret false\nend\nif ne get res 4 2\nret false\nend\nif ne get res 5 3\nret false\nend\nif ne get res 6 4\nret false\nend\nif ne get res 7 5\nret false\nend\nif ne get res 8 6\nret false\nend\nif ne get res 9 7\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nput a0 9 10\nres = new long 4096 0\nr = rotate_right a0 2 res\nif ne r 10\nret false\nend\nif ne get res 0 9\nret false\nend\nif ne get res 1 10\nret false\nend\nif ne get res 2 1\nret false\nend\nif ne get res 3 2\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 4\nret false\nend\nif ne get res 6 5\nret false\nend\nif ne get res 7 6\nret false\nend\nif ne get res 8 7\nret false\nend\nif ne get res 9 8\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nput a0 9 10\nres = new long 4096 0\nr = rotate_right a0 5 res\nif ne r 10\nret false\nend\nif ne get res 0 6\nret false\nend\nif ne get res 1 7\nret false\nend\nif ne get res 2 8\nret false\nend\nif ne get res 3 9\nret false\nend\nif ne get res 4 10\nret false\nend\nif ne get res 5 1\nret false\nend\nif ne get res 6 2\nret false\nend\nif ne get res 7 3\nret false\nend\nif ne get res 8 4\nret false\nend\nif ne get res 9 5\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_745_divisible_by_digits", "language": "om", "prompt": "om2\nnote Write a function to find numbers within a given range from startnum ti endnum where every number is divisible by every digit it contains. https://www.w3resource.com/Omega-exercises/lambda/Omega-lambda-exercise-24.php\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn divisible_by_digits startnum long endnum long res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_745_divisible_by_digits.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new long 4096 0\nr = divisible_by_digits 1 22 res\nif ne r 13\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 5\nret false\nend\nif ne get res 5 6\nret false\nend\nif ne get res 6 7\nret false\nend\nif ne get res 7 8\nret false\nend\nif ne get res 8 9\nret false\nend\nif ne get res 9 11\nret false\nend\nif ne get res 10 12\nret false\nend\nif ne get res 11 15\nret false\nend\nif ne get res 12 22\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new long 4096 0\nr = divisible_by_digits 1 15 res\nif ne r 12\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nif ne get res 4 5\nret false\nend\nif ne get res 5 6\nret false\nend\nif ne get res 6 7\nret false\nend\nif ne get res 7 8\nret false\nend\nif ne get res 8 9\nret false\nend\nif ne get res 9 11\nret false\nend\nif ne get res 10 12\nret false\nend\nif ne get res 11 15\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new long 4096 0\nr = divisible_by_digits 20 25 res\nif ne r 2\nret false\nend\nif ne get res 0 22\nret false\nend\nif ne get res 1 24\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_747_lcs_of_three", "language": "om", "prompt": "om2\nnote Write a function to find the longest common subsequence for the given three string sequence. https://www.geeksforgeeks.org/lcs-longest-common-subsequence-three-strings/\nfn lcs_of_three X view uchar * Y view uchar * Z view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_747_lcs_of_three.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"AGGT12\"\ntext t0_1 \"12TXAYB\"\ntext t0_2 \"12XBA\"\nfn tc_0 to bool\nr = lcs_of_three t0_0 t0_1 t0_2\nret eq r 2\nend\ntext t1_0 \"Reels\"\ntext t1_1 \"Reelsfor\"\ntext t1_2 \"ReelsforReels\"\nfn tc_1 to bool\nr = lcs_of_three t1_0 t1_1 t1_2\nret eq r 5\nend\ntext t2_0 \"abcd1e2\"\ntext t2_1 \"bc12ea\"\ntext t2_2 \"bd1ea\"\nfn tc_2 to bool\nr = lcs_of_three t2_0 t2_1 t2_2\nret eq r 3\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_748_capital_words_spaces", "language": "om", "prompt": "om2\nnote Write a function to put spaces between words starting with capital letters in a given string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn capital_words_spaces str1 view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_748_capital_words_spaces.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"Python\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = capital_words_spaces t0_0 res\nif ne r 6\nret false\nend\nif ne get res 0 80\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 116\nret false\nend\nif ne get res 3 104\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 110\nret false\nend\nret true\nend\ntext t1_0 \"PythonProgrammingExamples\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = capital_words_spaces t1_0 res\nif ne r 27\nret false\nend\nif ne get res 0 80\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 116\nret false\nend\nif ne get res 3 104\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 110\nret false\nend\nif ne get res 6 32\nret false\nend\nif ne get res 7 80\nret false\nend\nif ne get res 8 114\nret false\nend\nif ne get res 9 111\nret false\nend\nif ne get res 10 103\nret false\nend\nif ne get res 11 114\nret false\nend\nif ne get res 12 97\nret false\nend\nif ne get res 13 109\nret false\nend\nif ne get res 14 109\nret false\nend\nif ne get res 15 105\nret false\nend\nif ne get res 16 110\nret false\nend\nif ne get res 17 103\nret false\nend\nif ne get res 18 32\nret false\nend\nif ne get res 19 69\nret false\nend\nif ne get res 20 120\nret false\nend\nif ne get res 21 97\nret false\nend\nif ne get res 22 109\nret false\nend\nif ne get res 23 112\nret false\nend\nif ne get res 24 108\nret false\nend\nif ne get res 25 101\nret false\nend\nif ne get res 26 115\nret false\nend\nret true\nend\ntext t2_0 \"GetReadyToBeCodingFreak\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = capital_words_spaces t2_0 res\nif ne r 28\nret false\nend\nif ne get res 0 71\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 116\nret false\nend\nif ne get res 3 32\nret false\nend\nif ne get res 4 82\nret false\nend\nif ne get res 5 101\nret false\nend\nif ne get res 6 97\nret false\nend\nif ne get res 7 100\nret false\nend\nif ne get res 8 121\nret false\nend\nif ne get res 9 32\nret false\nend\nif ne get res 10 84\nret false\nend\nif ne get res 11 111\nret false\nend\nif ne get res 12 32\nret false\nend\nif ne get res 13 66\nret false\nend\nif ne get res 14 101\nret false\nend\nif ne get res 15 32\nret false\nend\nif ne get res 16 67\nret false\nend\nif ne get res 17 111\nret false\nend\nif ne get res 18 100\nret false\nend\nif ne get res 19 105\nret false\nend\nif ne get res 20 110\nret false\nend\nif ne get res 21 103\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 70\nret false\nend\nif ne get res 24 114\nret false\nend\nif ne get res 25 101\nret false\nend\nif ne get res 26 97\nret false\nend\nif ne get res 27 107\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_750_add_tuple", "language": "om", "prompt": "om2\nnote Write a function to add the given array to the given array.\nnote Omega name: test_list is test_lis here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn add_tuple test_lis view long * test_tup view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_750_add_tuple.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 5\nput a0 1 6\nput a0 2 7\na1 = new long 2 0\nput a1 0 9\nput a1 1 10\nres = new long 4096 0\nr = add_tuple a0 a1 res\nif ne r 5\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 6\nret false\nend\nif ne get res 2 7\nret false\nend\nif ne get res 3 9\nret false\nend\nif ne get res 4 10\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 6\nput a0 1 7\nput a0 2 8\na1 = new long 2 0\nput a1 0 10\nput a1 1 11\nres = new long 4096 0\nr = add_tuple a0 a1 res\nif ne r 5\nret false\nend\nif ne get res 0 6\nret false\nend\nif ne get res 1 7\nret false\nend\nif ne get res 2 8\nret false\nend\nif ne get res 3 10\nret false\nend\nif ne get res 4 11\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 7\nput a0 1 8\nput a0 2 9\na1 = new long 2 0\nput a1 0 11\nput a1 1 12\nres = new long 4096 0\nr = add_tuple a0 a1 res\nif ne r 5\nret false\nend\nif ne get res 0 7\nret false\nend\nif ne get res 1 8\nret false\nend\nif ne get res 2 9\nret false\nend\nif ne get res 3 11\nret false\nend\nif ne get res 4 12\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_751_check_min_heap", "language": "om", "prompt": "om2\nnote Write a function to check if the given array represents min heap or not. https://www.geeksforgeeks.org/how-to-check-if-a-given-array-represents-a-binary-heap/\nfn check_min_heap arr view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_751_check_min_heap.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nr = check_min_heap a0\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 2\nput a0 1 3\nput a0 2 4\nput a0 3 5\nput a0 4 10\nput a0 5 15\nr = check_min_heap a0\nret eq r true\nend\nfn tc_2 to bool\na0 = new long 6 0\nput a0 0 2\nput a0 1 10\nput a0 2 4\nput a0 3 5\nput a0 4 3\nput a0 5 15\nr = check_min_heap a0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_752_jacobsthal_num", "language": "om", "prompt": "om2\nnote Write a function to find the nth jacobsthal number. https://www.geeksforgeeks.org/jacobsthal-and-jacobsthal-lucas-numbers/ 0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, ...\nfn jacobsthal_num n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_752_jacobsthal_num.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = jacobsthal_num 5\nret eq r 11\nend\nfn tc_1 to bool\nr = jacobsthal_num 2\nret eq r 1\nend\nfn tc_2 to bool\nr = jacobsthal_num 4\nret eq r 5\nend\nfn tc_3 to bool\nr = jacobsthal_num 13\nret eq r 2731\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_756_text_match_zero_one", "language": "om", "prompt": "om2\nnote Write a function that matches a string that has an 'a' followed by one or more 'b's. https://www.w3resource.com/Omega-exercises/re/Omega-re-exercise-3.php\nnote Omega name: text is text_ here.\nfn text_match_zero_one text_ view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_756_text_match_zero_one.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"ac\"\nfn tc_0 to bool\nr = text_match_zero_one t0_0\nret eq r false\nend\ntext t1_0 \"dc\"\nfn tc_1 to bool\nr = text_match_zero_one t1_0\nret eq r false\nend\ntext t2_0 \"abbbba\"\nfn tc_2 to bool\nr = text_match_zero_one t2_0\nret eq r true\nend\ntext t3_0 \"dsabbbba\"\nfn tc_3 to bool\nr = text_match_zero_one t3_0\nret eq r true\nend\ntext t4_0 \"asbbbba\"\nfn tc_4 to bool\nr = text_match_zero_one t4_0\nret eq r false\nend\ntext t5_0 \"abaaa\"\nfn tc_5 to bool\nr = text_match_zero_one t5_0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_759_is_decimal", "language": "om", "prompt": "om2\nnote Write a function to check whether a given string is a decimal number with a precision of 2.\nfn is_decimal num view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_759_is_decimal.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"123.11\"\nfn tc_0 to bool\nr = is_decimal t0_0\nret eq r true\nend\ntext t1_0 \"e666.86\"\nfn tc_1 to bool\nr = is_decimal t1_0\nret eq r false\nend\ntext t2_0 \"3.124587\"\nfn tc_2 to bool\nr = is_decimal t2_0\nret eq r false\nend\ntext t3_0 \"1.11\"\nfn tc_3 to bool\nr = is_decimal t3_0\nret eq r true\nend\ntext t4_0 \"1.1.11\"\nfn tc_4 to bool\nr = is_decimal t4_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_760_unique_Element", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether an array of numbers contains only one distinct element or not.\nfn unique_Element arr view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_760_unique_Element.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 1\nput a0 2 1\nr = unique_Element a0\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 1\nput a0 3 2\nr = unique_Element a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nr = unique_Element a0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_762_check_monthnumber_number", "language": "om", "prompt": "om2\nnote Write a function to check whether the given month number contains 30 days or not. Months are given as number from 1 to 12.\nnote Omega name: monthnum3 is monthnum here.\nfn check_monthnumber_number monthnum long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_762_check_monthnumber_number.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = check_monthnumber_number 6\nret eq r true\nend\nfn tc_1 to bool\nr = check_monthnumber_number 2\nret eq r false\nend\nfn tc_2 to bool\nr = check_monthnumber_number 12\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_763_find_min_diff", "language": "om", "prompt": "om2\nnote Write an Omega function to find the minimum difference between any two elements in a given array. https://www.geeksforgeeks.org/find-minimum-difference-pair/\nfn find_min_diff arr view long * n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_763_find_min_diff.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 5\nput a0 2 3\nput a0 3 19\nput a0 4 18\nput a0 5 25\nr = find_min_diff a0 6\nret eq r 1\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 6\nr = find_min_diff a0 4\nret eq r 1\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 30\nput a0 1 5\nput a0 2 20\nput a0 3 9\nr = find_min_diff a0 4\nret eq r 4\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_764_number_ctr", "language": "om", "prompt": "om2\nnote Write an Omega function to count number of digits in a given string.\nfn number_ctr str view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_764_number_ctr.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"program2bedone\"\nfn tc_0 to bool\nr = number_ctr t0_0\nret eq r 1\nend\ntext t1_0 \"3wonders\"\nfn tc_1 to bool\nr = number_ctr t1_0\nret eq r 1\nend\ntext t2_0 \"123\"\nfn tc_2 to bool\nr = number_ctr t2_0\nret eq r 3\nend\ntext t3_0 \"3wond-1ers2\"\nfn tc_3 to bool\nr = number_ctr t3_0\nret eq r 3\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_765_is_polite", "language": "om", "prompt": "om2\nnote Write a function to find nth polite number. geeksforgeeks.org/n-th-polite-number/\nfn is_polite n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_765_is_polite.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_polite 7\nret eq r 11\nend\nfn tc_1 to bool\nr = is_polite 4\nret eq r 7\nend\nfn tc_2 to bool\nr = is_polite 9\nret eq r 13\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_767_get_pairs_count", "language": "om", "prompt": "om2\nnote Write an Omega function to count the number of pairs whose sum is equal to \u2018sum\u2019. The funtion gets as input an array of numbers and the sum,\nfn get_pairs_count arr view long * sum long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_767_get_pairs_count.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 1\nput a0 2 1\nput a0 3 1\nr = get_pairs_count a0 2\nret eq r 6\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 5\nput a0 2 7\nput a0 3 -1\nput a0 4 5\nr = get_pairs_count a0 6\nret eq r 3\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 -2\nput a0 2 3\nr = get_pairs_count a0 1\nret eq r 1\nend\nfn tc_3 to bool\na0 = new long 3 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 3\nr = get_pairs_count a0 -3\nret eq r 1\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_769_Diff", "language": "om", "prompt": "om2\nnote Write an Omega function to get the difference between two lists.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn Diff li1 view long * li2 view long * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_769_Diff.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 7 0\nput a0 0 10\nput a0 1 15\nput a0 2 20\nput a0 3 25\nput a0 4 30\nput a0 5 35\nput a0 6 40\na1 = new long 3 0\nput a1 0 25\nput a1 1 40\nput a1 2 35\nres = new long 4096 0\nr = Diff a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 10\nret false\nend\nif ne get res 1 20\nret false\nend\nif ne get res 2 30\nret false\nend\nif ne get res 3 15\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\na1 = new long 3 0\nput a1 0 6\nput a1 1 7\nput a1 2 1\nres = new long 4096 0\nr = Diff a0 a1 res\nif ne r 6\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 5\nret false\nend\nif ne get res 4 6\nret false\nend\nif ne get res 5 7\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\na1 = new long 3 0\nput a1 0 6\nput a1 1 7\nput a1 2 1\nres = new long 4096 0\nr = Diff a0 a1 res\nif ne r 4\nret false\nend\nif ne get res 0 2\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 6\nret false\nend\nif ne get res 3 7\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_770_odd_num_sum", "language": "om", "prompt": "om2\nnote Write an Omega function to find the sum of fourth power of first n odd natural numbers.\nfn odd_num_sum n long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_770_odd_num_sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = odd_num_sum 2\nret eq r 82\nend\nfn tc_1 to bool\nr = odd_num_sum 3\nret eq r 707\nend\nfn tc_2 to bool\nr = odd_num_sum 4\nret eq r 3108\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_771_check_expression", "language": "om", "prompt": "om2\nnote Write a function to check if the given expression is balanced or not. https://www.geeksforgeeks.org/check-for-balanced-parentheses-in-an-expression/\nfn check_expression exp view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_771_check_expression.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"{()}[{}]\"\nfn tc_0 to bool\nr = check_expression t0_0\nret eq r true\nend\ntext t1_0 \"{()}[{]\"\nfn tc_1 to bool\nr = check_expression t1_0\nret eq r false\nend\ntext t2_0 \"{()}[{}][]({})\"\nfn tc_2 to bool\nr = check_expression t2_0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_772_remove_length", "language": "om", "prompt": "om2\nnote Write a function to remove all the words with k length in the given string.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn remove_length test_str view uchar * K long res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_772_remove_length.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"The person is most value tet\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = remove_length t0_0 3 res\nif ne r 20\nret false\nend\nif ne get res 0 112\nret false\nend\nif ne get res 1 101\nret false\nend\nif ne get res 2 114\nret false\nend\nif ne get res 3 115\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 110\nret false\nend\nif ne get res 6 32\nret false\nend\nif ne get res 7 105\nret false\nend\nif ne get res 8 115\nret false\nend\nif ne get res 9 32\nret false\nend\nif ne get res 10 109\nret false\nend\nif ne get res 11 111\nret false\nend\nif ne get res 12 115\nret false\nend\nif ne get res 13 116\nret false\nend\nif ne get res 14 32\nret false\nend\nif ne get res 15 118\nret false\nend\nif ne get res 16 97\nret false\nend\nif ne get res 17 108\nret false\nend\nif ne get res 18 117\nret false\nend\nif ne get res 19 101\nret false\nend\nret true\nend\ntext t1_0 \"If you told me about this ok\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = remove_length t1_0 4 res\nif ne r 18\nret false\nend\nif ne get res 0 73\nret false\nend\nif ne get res 1 102\nret false\nend\nif ne get res 2 32\nret false\nend\nif ne get res 3 121\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 117\nret false\nend\nif ne get res 6 32\nret false\nend\nif ne get res 7 109\nret false\nend\nif ne get res 8 101\nret false\nend\nif ne get res 9 32\nret false\nend\nif ne get res 10 97\nret false\nend\nif ne get res 11 98\nret false\nend\nif ne get res 12 111\nret false\nend\nif ne get res 13 117\nret false\nend\nif ne get res 14 116\nret false\nend\nif ne get res 15 32\nret false\nend\nif ne get res 16 111\nret false\nend\nif ne get res 17 107\nret false\nend\nret true\nend\ntext t2_0 \"Forces of darkeness is come into the play\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = remove_length t2_0 4 res\nif ne r 26\nret false\nend\nif ne get res 0 70\nret false\nend\nif ne get res 1 111\nret false\nend\nif ne get res 2 114\nret false\nend\nif ne get res 3 99\nret false\nend\nif ne get res 4 101\nret false\nend\nif ne get res 5 115\nret false\nend\nif ne get res 6 32\nret false\nend\nif ne get res 7 111\nret false\nend\nif ne get res 8 102\nret false\nend\nif ne get res 9 32\nret false\nend\nif ne get res 10 100\nret false\nend\nif ne get res 11 97\nret false\nend\nif ne get res 12 114\nret false\nend\nif ne get res 13 107\nret false\nend\nif ne get res 14 101\nret false\nend\nif ne get res 15 110\nret false\nend\nif ne get res 16 101\nret false\nend\nif ne get res 17 115\nret false\nend\nif ne get res 18 115\nret false\nend\nif ne get res 19 32\nret false\nend\nif ne get res 20 105\nret false\nend\nif ne get res 21 115\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 116\nret false\nend\nif ne get res 24 104\nret false\nend\nif ne get res 25 101\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_775_odd_position", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether every odd index contains odd numbers of a given array.\nfn odd_position nums view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_775_odd_position.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 8 0\nput a0 0 2\nput a0 1 1\nput a0 2 4\nput a0 3 3\nput a0 4 6\nput a0 5 7\nput a0 6 6\nput a0 7 3\nr = odd_position a0\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 4\nput a0 1 1\nput a0 2 2\nr = odd_position a0\nret eq r true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = odd_position a0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_776_count_vowels", "language": "om", "prompt": "om2\nnote Write a function to count those characters which have vowels as their neighbors in the given string.\nfn count_vowels test_str view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_776_count_vowels.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"bestinstareels\"\nfn tc_0 to bool\nr = count_vowels t0_0\nret eq r 7\nend\ntext t1_0 \"partofthejourneyistheend\"\nfn tc_1 to bool\nr = count_vowels t1_0\nret eq r 12\nend\ntext t2_0 \"amazonprime\"\nfn tc_2 to bool\nr = count_vowels t2_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_777_find_sum", "language": "om", "prompt": "om2\nnote Write an Omega function to find the sum of non-repeated elements in a given array.\nfn find_sum arr view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_777_find_sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 1\nput a0 4 1\nput a0 5 4\nput a0 6 5\nput a0 7 6\nr = find_sum a0\nret eq r 21\nend\nfn tc_1 to bool\na0 = new long 9 0\nput a0 0 1\nput a0 1 10\nput a0 2 9\nput a0 3 4\nput a0 4 2\nput a0 5 10\nput a0 6 10\nput a0 7 45\nput a0 8 4\nr = find_sum a0\nret eq r 71\nend\nfn tc_2 to bool\na0 = new long 9 0\nput a0 0 12\nput a0 1 10\nput a0 2 9\nput a0 3 45\nput a0 4 2\nput a0 5 10\nput a0 6 10\nput a0 7 45\nput a0 8 10\nr = find_sum a0\nret eq r 78\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_781_count_divisors", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether the count of divisors is even. https://www.w3resource.com/Omega-exercises/basic/Omega-basic-1-exercise-24.php\nfn count_divisors n long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_781_count_divisors.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = count_divisors 10\nret eq r true\nend\nfn tc_1 to bool\nr = count_divisors 100\nret eq r false\nend\nfn tc_2 to bool\nr = count_divisors 125\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_782_odd_length_sum", "language": "om", "prompt": "om2\nnote Write an Omega function to find the sum of all odd length subarrays. https://www.geeksforgeeks.org/sum-of-all-odd-length-subarrays/\nfn odd_length_sum arr view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_782_odd_length_sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nr = odd_length_sum a0\nret eq r 14\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 1\nput a0 3 2\nr = odd_length_sum a0\nret eq r 15\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 1\nput a0 1 7\nr = odd_length_sum a0\nret eq r 8\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_783_rgb_to_hsv", "language": "om", "prompt": "om2\nnote Write a function to convert rgb color to hsv color. https://www.geeksforgeeks.org/program-change-rgb-color-model-hsv-color-model/\nnote Omega name: r is r_ here.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rgb_to_hsv r_ long g long b long res edit f64 * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_783_rgb_to_hsv.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nres = new f64 4096 0.0\nr = rgb_to_hsv 255 255 255 res\nif ne r 3\nret false\nend\nif ne get res 0 0.0\nret false\nend\nif ne get res 1 0.0\nret false\nend\nif ne get res 2 100.0\nret false\nend\nret true\nend\nfn tc_1 to bool\nres = new f64 4096 0.0\nr = rgb_to_hsv 0 215 0 res\nif ne r 3\nret false\nend\nif ne get res 0 120.0\nret false\nend\nif ne get res 1 100.0\nret false\nend\nif ne get res 2 84.31372549019608\nret false\nend\nret true\nend\nfn tc_2 to bool\nres = new f64 4096 0.0\nr = rgb_to_hsv 10 215 110 res\nif ne r 3\nret false\nend\nif ne get res 0 149.26829268292684\nret false\nend\nif ne get res 1 95.34883720930233\nret false\nend\nif ne get res 2 84.31372549019608\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_784_mul_even_odd", "language": "om", "prompt": "om2\nnote Write a function to find the product of first even and odd number of a given array.\nfn mul_even_odd list1 view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_784_mul_even_odd.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 3\nput a0 2 5\nput a0 3 7\nput a0 4 4\nput a0 5 1\nput a0 6 6\nput a0 7 8\nr = mul_even_odd a0\nret eq r 4\nend\nfn tc_1 to bool\na0 = new long 10 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nput a0 6 7\nput a0 7 8\nput a0 8 9\nput a0 9 10\nr = mul_even_odd a0\nret eq r 2\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 5\nput a0 2 7\nput a0 3 9\nput a0 4 10\nr = mul_even_odd a0\nret eq r 10\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_785_tuple_str_int", "language": "om", "prompt": "om2\nnote Write a function to convert array string to integer array.\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn tuple_str_int test_str view uchar * res edit long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_785_tuple_str_int.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"(7, 8, 9)\"\nfn tc_0 to bool\nres = new long 4096 0\nr = tuple_str_int t0_0 res\nif ne r 3\nret false\nend\nif ne get res 0 7\nret false\nend\nif ne get res 1 8\nret false\nend\nif ne get res 2 9\nret false\nend\nret true\nend\ntext t1_0 \"(1, 2, 3)\"\nfn tc_1 to bool\nres = new long 4096 0\nr = tuple_str_int t1_0 res\nif ne r 3\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nret true\nend\ntext t2_0 \"(4, 5, 6)\"\nfn tc_2 to bool\nres = new long 4096 0\nr = tuple_str_int t2_0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\ntext t3_0 \"(7, 81, 19)\"\nfn tc_3 to bool\nres = new long 4096 0\nr = tuple_str_int t3_0 res\nif ne r 3\nret false\nend\nif ne get res 0 7\nret false\nend\nif ne get res 1 81\nret false\nend\nif ne get res 2 19\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_786_right_insertion", "language": "om", "prompt": "om2\nnote Write a function to locate the right insertion point for a specified value in sorted order.\nfn right_insertion a view long * x long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_786_right_insertion.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 5\nr = right_insertion a0 6\nret eq r 4\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 5\nr = right_insertion a0 3\nret eq r 2\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 4\nput a0 3 5\nr = right_insertion a0 7\nret eq r 4\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_787_text_match_three", "language": "om", "prompt": "om2\nnote Write a function that matches a string that has an a followed by three 'b'.\nnote Omega name: text is text_ here.\nfn text_match_three text_ view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_787_text_match_three.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"ac\"\nfn tc_0 to bool\nr = text_match_three t0_0\nret eq r false\nend\ntext t1_0 \"dc\"\nfn tc_1 to bool\nr = text_match_three t1_0\nret eq r false\nend\ntext t2_0 \"abbbba\"\nfn tc_2 to bool\nr = text_match_three t2_0\nret eq r true\nend\ntext t3_0 \"caacabbbba\"\nfn tc_3 to bool\nr = text_match_three t3_0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_790_even_position", "language": "om", "prompt": "om2\nnote Write an Omega function to check whether every even index contains even numbers of a given array.\nfn even_position nums view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_790_even_position.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 3\nput a0 1 2\nput a0 2 1\nr = even_position a0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = even_position a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 2\nput a0 1 1\nput a0 2 4\nr = even_position a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_793_last", "language": "om", "prompt": "om2\nnote Write an Omega function to find the last position of an element in a sorted array.\nfn last arr view long * x long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_793_last.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = last a0 1\nret eq r 0\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 1\nput a0 2 1\nput a0 3 2\nput a0 4 3\nput a0 5 4\nr = last a0 1\nret eq r 2\nend\nfn tc_2 to bool\na0 = new long 7 0\nput a0 0 2\nput a0 1 3\nput a0 2 2\nput a0 3 3\nput a0 4 6\nput a0 5 8\nput a0 6 9\nr = last a0 3\nret eq r 3\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_794_text_starta_endb", "language": "om", "prompt": "om2\nnote Write a function that matches a string that has an 'a' followed by anything, ending in 'b'.\nnote Omega name: text is text_ here.\nfn text_starta_endb text_ view uchar * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_794_text_starta_endb.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"aabbbb\"\nfn tc_0 to bool\nr = text_starta_endb t0_0\nret eq r true\nend\ntext t1_0 \"aabAbbbc\"\nfn tc_1 to bool\nr = text_starta_endb t1_0\nret eq r false\nend\ntext t2_0 \"accddbbjjj\"\nfn tc_2 to bool\nr = text_starta_endb t2_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_797_sum_in_range", "language": "om", "prompt": "om2\nnote Write an Omega function to find the sum of all odd natural numbers within the range l and r.\nnote Omega name: r is r_ here.\nfn sum_in_range l long r_ long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_797_sum_in_range.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = sum_in_range 2 5\nret eq r 8\nend\nfn tc_1 to bool\nr = sum_in_range 5 7\nret eq r 12\nend\nfn tc_2 to bool\nr = sum_in_range 7 13\nret eq r 40\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_798__sum", "language": "om", "prompt": "om2\nnote Write an Omega function to find the sum of an array.\nfn _sum arr view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_798__sum.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = _sum a0\nret eq r 6\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 15\nput a0 1 12\nput a0 2 13\nput a0 3 10\nr = _sum a0\nret eq r 50\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 0\nput a0 1 1\nput a0 2 2\nr = _sum a0\nret eq r 3\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_799_left_rotate", "language": "om", "prompt": "om2\nnote Write a function to that rotate left bits by d bits a given number. We assume that the number is 32 bit.\nfn left_rotate n long d long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_799_left_rotate.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = left_rotate 16 2\nret eq r 64\nend\nfn tc_1 to bool\nr = left_rotate 10 2\nret eq r 40\nend\nfn tc_2 to bool\nr = left_rotate 99 3\nret eq r 792\nend\nfn tc_3 to bool\nr = left_rotate 99 3\nret eq r 792\nend\nfn tc_4 to bool\nr = left_rotate 1 3\nret eq r 8\nend\nfn tc_5 to bool\nr = left_rotate 5 3\nret eq r 40\nend\nfn tc_6 to bool\nr = left_rotate 29 3\nret eq r 232\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_800_remove_all_spaces", "language": "om", "prompt": "om2\nnote Write a function to remove all whitespaces from a string.\nnote Omega name: text is text_ here.\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn remove_all_spaces text_ view uchar * res edit uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_800_remove_all_spaces.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"python program\"\nfn tc_0 to bool\nres = new uchar 4096 0\nr = remove_all_spaces t0_0 res\nif ne r 13\nret false\nend\nif ne get res 0 112\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 116\nret false\nend\nif ne get res 3 104\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 110\nret false\nend\nif ne get res 6 112\nret false\nend\nif ne get res 7 114\nret false\nend\nif ne get res 8 111\nret false\nend\nif ne get res 9 103\nret false\nend\nif ne get res 10 114\nret false\nend\nif ne get res 11 97\nret false\nend\nif ne get res 12 109\nret false\nend\nret true\nend\ntext t1_0 \"python programming language\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = remove_all_spaces t1_0 res\nif ne r 25\nret false\nend\nif ne get res 0 112\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 116\nret false\nend\nif ne get res 3 104\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 110\nret false\nend\nif ne get res 6 112\nret false\nend\nif ne get res 7 114\nret false\nend\nif ne get res 8 111\nret false\nend\nif ne get res 9 103\nret false\nend\nif ne get res 10 114\nret false\nend\nif ne get res 11 97\nret false\nend\nif ne get res 12 109\nret false\nend\nif ne get res 13 109\nret false\nend\nif ne get res 14 105\nret false\nend\nif ne get res 15 110\nret false\nend\nif ne get res 16 103\nret false\nend\nif ne get res 17 108\nret false\nend\nif ne get res 18 97\nret false\nend\nif ne get res 19 110\nret false\nend\nif ne get res 20 103\nret false\nend\nif ne get res 21 117\nret false\nend\nif ne get res 22 97\nret false\nend\nif ne get res 23 103\nret false\nend\nif ne get res 24 101\nret false\nend\nret true\nend\ntext t2_0 \"python program\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = remove_all_spaces t2_0 res\nif ne r 13\nret false\nend\nif ne get res 0 112\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 116\nret false\nend\nif ne get res 3 104\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 110\nret false\nend\nif ne get res 6 112\nret false\nend\nif ne get res 7 114\nret false\nend\nif ne get res 8 111\nret false\nend\nif ne get res 9 103\nret false\nend\nif ne get res 10 114\nret false\nend\nif ne get res 11 97\nret false\nend\nif ne get res 12 109\nret false\nend\nret true\nend\ntext t3_0 \" python program\"\nfn tc_3 to bool\nres = new uchar 4096 0\nr = remove_all_spaces t3_0 res\nif ne r 13\nret false\nend\nif ne get res 0 112\nret false\nend\nif ne get res 1 121\nret false\nend\nif ne get res 2 116\nret false\nend\nif ne get res 3 104\nret false\nend\nif ne get res 4 111\nret false\nend\nif ne get res 5 110\nret false\nend\nif ne get res 6 112\nret false\nend\nif ne get res 7 114\nret false\nend\nif ne get res 8 111\nret false\nend\nif ne get res 9 103\nret false\nend\nif ne get res 10 114\nret false\nend\nif ne get res 11 97\nret false\nend\nif ne get res 12 109\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_801_test_three_equal", "language": "om", "prompt": "om2\nnote Write an Omega function to count the number of equal numbers from three given integers.\nfn test_three_equal x long y long z long to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_801_test_three_equal.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = test_three_equal 1 1 1\nret eq r 3\nend\nfn tc_1 to bool\nr = test_three_equal -1 -2 -3\nret eq r 0\nend\nfn tc_2 to bool\nr = test_three_equal 1 2 2\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_802_count_rotation", "language": "om", "prompt": "om2\nnote Write an Omega function to count the number of rotations required to generate a sorted array. https://www.geeksforgeeks.org/count-of-rotations-required-to-generate-a-sorted-array/\nfn count_rotation arr view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_802_count_rotation.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 3\nput a0 1 2\nput a0 2 1\nr = count_rotation a0\nret eq r 1\nend\nfn tc_1 to bool\na0 = new long 5 0\nput a0 0 4\nput a0 1 5\nput a0 2 1\nput a0 3 2\nput a0 4 3\nr = count_rotation a0\nret eq r 2\nend\nfn tc_2 to bool\na0 = new long 6 0\nput a0 0 7\nput a0 1 8\nput a0 2 9\nput a0 3 1\nput a0 4 2\nput a0 5 3\nr = count_rotation a0\nret eq r 3\nend\nfn tc_3 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = count_rotation a0\nret eq r 0\nend\nfn tc_4 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 3\nput a0 2 2\nr = count_rotation a0\nret eq r 2\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_803_is_perfect_square", "language": "om", "prompt": "om2\nnote Write a function to check whether the given number is a perfect square or not. https://www.geeksforgeeks.org/check-if-given-number-is-perfect-square-in-cpp/\nfn is_perfect_square n long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_803_is_perfect_square.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\nr = is_perfect_square 10\nret eq r false\nend\nfn tc_1 to bool\nr = is_perfect_square 36\nret eq r true\nend\nfn tc_2 to bool\nr = is_perfect_square 14\nret eq r false\nend\nfn tc_3 to bool\nr = is_perfect_square 196\nret eq r true\nend\nfn tc_4 to bool\nr = is_perfect_square 125\nret eq r false\nend\nfn tc_5 to bool\nr = is_perfect_square 15625\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_804_is_product_even", "language": "om", "prompt": "om2\nnote Write a function to check whether the product of numbers in an array is even or not.\nfn is_product_even arr view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_804_is_product_even.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nr = is_product_even a0\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 1\nput a0 3 4\nr = is_product_even a0\nret eq r true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 1\nput a0 1 1\nr = is_product_even a0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_806_max_run_uppercase", "language": "om", "prompt": "om2\nnote Write a function to find maximum run of uppercase characters in the given string.\nfn max_run_uppercase test_str view uchar * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_806_max_run_uppercase.py", "prompt_terminology": "reworded", "tests": "text t0_0 \"GeMKSForGERksISBESt\"\nfn tc_0 to bool\nr = max_run_uppercase t0_0\nret eq r 5\nend\ntext t1_0 \"PrECIOusMOVemENTSYT\"\nfn tc_1 to bool\nr = max_run_uppercase t1_0\nret eq r 6\nend\ntext t2_0 \"GooGLEFluTTER\"\nfn tc_2 to bool\nr = max_run_uppercase t2_0\nret eq r 4\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_807_first_odd", "language": "om", "prompt": "om2\nnote Write an Omega function to find the first odd number in a given array of numbers.\nfn first_odd nums view long * to long\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_807_first_odd.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 3\nput a0 2 5\nr = first_odd a0\nret eq r 1\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 2\nput a0 1 4\nput a0 2 1\nput a0 3 3\nr = first_odd a0\nret eq r 1\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 8\nput a0 1 9\nput a0 2 1\nr = first_odd a0\nret eq r 9\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_808_check_K", "language": "om", "prompt": "om2\nnote Write a function to check if the given tuples contain the k or not.\nfn check_K test_tup view long * K long to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_808_check_K.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 10\nput a0 1 4\nput a0 2 5\nput a0 3 6\nput a0 4 8\nr = check_K a0 6\nret eq r true\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nput a0 4 5\nput a0 5 6\nr = check_K a0 7\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 6 0\nput a0 0 7\nput a0 1 8\nput a0 2 9\nput a0 3 44\nput a0 4 11\nput a0 5 12\nr = check_K a0 11\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} +{"name": "mbpp_809_check_smaller", "language": "om", "prompt": "om2\nnote Write a function to check if each element of second array is smaller than its corresponding element in the first array.\nnote Omega name: test_tup1 is test_tup here.\nnote Omega name: test_tup2 is test_tu_ here.\nfn check_smaller test_tup view long * test_tu_ view long * to bool\n", "doctests": "transform", "original": "datasets/mbpp-typed/mbpp_809_check_smaller.py", "prompt_terminology": "reworded", "tests": "fn tc_0 to bool\na0 = new long 3 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\na1 = new long 3 0\nput a1 0 2\nput a1 1 3\nput a1 2 4\nr = check_smaller a0 a1\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 3 0\nput a0 0 4\nput a0 1 5\nput a0 2 6\na1 = new long 3 0\nput a1 0 3\nput a1 1 4\nput a1 2 5\nr = check_smaller a0 a1\nret eq r true\nend\nfn tc_2 to bool\na0 = new long 3 0\nput a0 0 11\nput a0 1 12\nput a0 2 13\na1 = new long 3 0\nput a1 0 10\nput a1 1 11\nput a1 2 12\nr = check_smaller a0 a1\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", "stop_tokens": ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "]} diff --git a/bench/results/hand/HumanEval_0_has_close_elements.json b/bench/results/hand/HumanEval_0_has_close_elements.json new file mode 100644 index 0000000..e5be09e --- /dev/null +++ b/bench/results/hand/HumanEval_0_has_close_elements.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_0_has_close_elements", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\n", + "tests": "fn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "for i ulong len numbers\nfor j ulong len numbers\nif ne i j\nd = fabs sub get numbers i get numbers j\nif lt d threshol\nret true\nend\nend\nend\nend\nret false\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand" +} diff --git a/bench/results/hand/HumanEval_0_has_close_elements.results.json b/bench/results/hand/HumanEval_0_has_close_elements.results.json new file mode 100644 index 0000000..16eb34d --- /dev/null +++ b/bench/results/hand/HumanEval_0_has_close_elements.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_0_has_close_elements", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\n", + "tests": "fn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand", + "results": [ + { + "program": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\nfor i ulong len numbers\nfor j ulong len numbers\nif ne i j\nd = fabs sub get numbers i get numbers j\nif lt d threshol\nret true\nend\nend\nend\nend\nret false\nend\n\nfn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 0, + "stdout": "MultiPL-E Omega: all tests passed\n", + "stderr": "", + "status": "OK", + "om_status": "pass", + "om_case": null, + "timestamp": 1793102754 + } + ] +} diff --git a/bench/results/hand/HumanEval_13_greatest_common_divisor.json b/bench/results/hand/HumanEval_13_greatest_common_divisor.json new file mode 100644 index 0000000..28aa63c --- /dev/null +++ b/bench/results/hand/HumanEval_13_greatest_common_divisor.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_13_greatest_common_divisor", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\n", + "tests": "fn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "x = a\ny = b\nwhile ne y 0 bound 999999\nt = rem x y\nx = y\ny = t\nend\nret x\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand" +} diff --git a/bench/results/hand/HumanEval_13_greatest_common_divisor.results.json b/bench/results/hand/HumanEval_13_greatest_common_divisor.results.json new file mode 100644 index 0000000..d3b0357 --- /dev/null +++ b/bench/results/hand/HumanEval_13_greatest_common_divisor.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_13_greatest_common_divisor", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\n", + "tests": "fn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand", + "results": [ + { + "program": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\nx = a\ny = b\nwhile ne y 0 bound 999999\nt = rem x y\nx = y\ny = t\nend\nret x\nend\n\nfn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 0, + "stdout": "MultiPL-E Omega: all tests passed\n", + "stderr": "", + "status": "OK", + "om_status": "pass", + "om_case": null, + "timestamp": 1793102754 + } + ] +} diff --git a/bench/results/hand/HumanEval_16_count_distinct_characters.json b/bench/results/hand/HumanEval_16_count_distinct_characters.json new file mode 100644 index 0000000..56f7173 --- /dev/null +++ b/bench/results/hand/HumanEval_16_count_distinct_characters.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_16_count_distinct_characters", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "seen = new uchar 256 0\nn = long 0\nfor i ulong len string\nc = get string i\nif and ge c 65 le c 90\nc = add c 32\nend\nif eq get seen c 0\nput seen c 1\nn = add n 1\nend\nend\nret n\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand" +} diff --git a/bench/results/hand/HumanEval_16_count_distinct_characters.results.json b/bench/results/hand/HumanEval_16_count_distinct_characters.results.json new file mode 100644 index 0000000..9873696 --- /dev/null +++ b/bench/results/hand/HumanEval_16_count_distinct_characters.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_16_count_distinct_characters", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand", + "results": [ + { + "program": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\nseen = new uchar 256 0\nn = long 0\nfor i ulong len string\nc = get string i\nif and ge c 65 le c 90\nc = add c 32\nend\nif eq get seen c 0\nput seen c 1\nn = add n 1\nend\nend\nret n\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 0, + "stdout": "MultiPL-E Omega: all tests passed\n", + "stderr": "", + "status": "OK", + "om_status": "pass", + "om_case": null, + "timestamp": 1793102754 + } + ] +} diff --git a/bench/results/hand/HumanEval_27_flip_case.json b/bench/results/hand/HumanEval_27_flip_case.json new file mode 100644 index 0000000..9bf93f3 --- /dev/null +++ b/bench/results/hand/HumanEval_27_flip_case.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_27_flip_case", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = long 0\nfor i ulong len string\nc = get string i\nif and ge c 97 le c 122\nc = sub c 32\nelse\nif and ge c 65 le c 90\nc = add c 32\nend\nend\nput res i c\nn = add n 1\nend\nret n\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand" +} diff --git a/bench/results/hand/HumanEval_27_flip_case.results.json b/bench/results/hand/HumanEval_27_flip_case.results.json new file mode 100644 index 0000000..85ca0fb --- /dev/null +++ b/bench/results/hand/HumanEval_27_flip_case.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_27_flip_case", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand", + "results": [ + { + "program": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\nn = long 0\nfor i ulong len string\nc = get string i\nif and ge c 97 le c 122\nc = sub c 32\nelse\nif and ge c 65 le c 90\nc = add c 32\nend\nend\nput res i c\nn = add n 1\nend\nret n\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 0, + "stdout": "MultiPL-E Omega: all tests passed\n", + "stderr": "", + "status": "OK", + "om_status": "pass", + "om_case": null, + "timestamp": 1793102754 + } + ] +} diff --git a/bench/results/hand/HumanEval_2_truncate_number.json b/bench/results/hand/HumanEval_2_truncate_number.json new file mode 100644 index 0000000..99f9218 --- /dev/null +++ b/bench/results/hand/HumanEval_2_truncate_number.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_2_truncate_number", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\n", + "tests": "fn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "w = long number\nret sub number f64 w\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand" +} diff --git a/bench/results/hand/HumanEval_2_truncate_number.results.json b/bench/results/hand/HumanEval_2_truncate_number.results.json new file mode 100644 index 0000000..ca06e69 --- /dev/null +++ b/bench/results/hand/HumanEval_2_truncate_number.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_2_truncate_number", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\n", + "tests": "fn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand", + "results": [ + { + "program": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\nw = long number\nret sub number f64 w\nend\n\nfn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 0, + "stdout": "MultiPL-E Omega: all tests passed\n", + "stderr": "", + "status": "OK", + "om_status": "pass", + "om_case": null, + "timestamp": 1793102754 + } + ] +} diff --git a/bench/results/hand/HumanEval_30_get_positive.json b/bench/results/hand/HumanEval_30_get_positive.json new file mode 100644 index 0000000..8afda2f --- /dev/null +++ b/bench/results/hand/HumanEval_30_get_positive.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_30_get_positive", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = long 0\nfor i ulong len l\nv = get l i\nif gt v 0\nput res n v\nn = add n 1\nend\nend\nret n\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand" +} diff --git a/bench/results/hand/HumanEval_30_get_positive.results.json b/bench/results/hand/HumanEval_30_get_positive.results.json new file mode 100644 index 0000000..c9a23c2 --- /dev/null +++ b/bench/results/hand/HumanEval_30_get_positive.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_30_get_positive", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand", + "results": [ + { + "program": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\nn = long 0\nfor i ulong len l\nv = get l i\nif gt v 0\nput res n v\nn = add n 1\nend\nend\nret n\nend\n\nfn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 0, + "stdout": "MultiPL-E Omega: all tests passed\n", + "stderr": "", + "status": "OK", + "om_status": "pass", + "om_case": null, + "timestamp": 1793102754 + } + ] +} diff --git a/bench/results/hand/HumanEval_3_below_zero.json b/bench/results/hand/HumanEval_3_below_zero.json new file mode 100644 index 0000000..0ef71c0 --- /dev/null +++ b/bench/results/hand/HumanEval_3_below_zero.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_3_below_zero", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "bal = long 0\nfor i ulong len operatio\nbal = add bal get operatio i\nif lt bal 0\nret true\nend\nend\nret false\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand" +} diff --git a/bench/results/hand/HumanEval_3_below_zero.results.json b/bench/results/hand/HumanEval_3_below_zero.results.json new file mode 100644 index 0000000..232db9e --- /dev/null +++ b/bench/results/hand/HumanEval_3_below_zero.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_3_below_zero", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand", + "results": [ + { + "program": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\nbal = long 0\nfor i ulong len operatio\nbal = add bal get operatio i\nif lt bal 0\nret true\nend\nend\nret false\nend\n\nfn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 0, + "stdout": "MultiPL-E Omega: all tests passed\n", + "stderr": "", + "status": "OK", + "om_status": "pass", + "om_case": null, + "timestamp": 1793102754 + } + ] +} diff --git a/bench/results/hand/HumanEval_48_is_palindrome.json b/bench/results/hand/HumanEval_48_is_palindrome.json new file mode 100644 index 0000000..98b1c11 --- /dev/null +++ b/bench/results/hand/HumanEval_48_is_palindrome.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_48_is_palindrome", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = len text_\nfor i ulong n\nj = sub sub n 1 i\nif ne get text_ i get text_ j\nret false\nend\nend\nret true\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand" +} diff --git a/bench/results/hand/HumanEval_48_is_palindrome.results.json b/bench/results/hand/HumanEval_48_is_palindrome.results.json new file mode 100644 index 0000000..767bbae --- /dev/null +++ b/bench/results/hand/HumanEval_48_is_palindrome.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_48_is_palindrome", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand", + "results": [ + { + "program": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\nn = len text_\nfor i ulong n\nj = sub sub n 1 i\nif ne get text_ i get text_ j\nret false\nend\nend\nret true\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 0, + "stdout": "MultiPL-E Omega: all tests passed\n", + "stderr": "", + "status": "OK", + "om_status": "pass", + "om_case": null, + "timestamp": 1793102754 + } + ] +} diff --git a/bench/results/hand/HumanEval_53_add.json b/bench/results/hand/HumanEval_53_add.json new file mode 100644 index 0000000..18132ef --- /dev/null +++ b/bench/results/hand/HumanEval_53_add.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_53_add", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\n", + "tests": "fn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "ret add x y\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand" +} diff --git a/bench/results/hand/HumanEval_53_add.results.json b/bench/results/hand/HumanEval_53_add.results.json new file mode 100644 index 0000000..8ac2442 --- /dev/null +++ b/bench/results/hand/HumanEval_53_add.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_53_add", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\n", + "tests": "fn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand", + "results": [ + { + "program": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\nret add x y\nend\n\nfn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 0, + "stdout": "MultiPL-E Omega: all tests passed\n", + "stderr": "", + "status": "OK", + "om_status": "pass", + "om_case": null, + "timestamp": 1793102754 + } + ] +} diff --git a/bench/results/hand/HumanEval_9_rolling_max.json b/bench/results/hand/HumanEval_9_rolling_max.json new file mode 100644 index 0000000..4ceb06e --- /dev/null +++ b/bench/results/hand/HumanEval_9_rolling_max.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_9_rolling_max", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = long 0\nm = long 0\nfor i ulong len numbers\nv = get numbers i\nif or eq i 0 gt v m\nm = v\nend\nput res i m\nn = add n 1\nend\nret n\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand" +} diff --git a/bench/results/hand/HumanEval_9_rolling_max.results.json b/bench/results/hand/HumanEval_9_rolling_max.results.json new file mode 100644 index 0000000..4ef4c0b --- /dev/null +++ b/bench/results/hand/HumanEval_9_rolling_max.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_9_rolling_max", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "hand", + "results": [ + { + "program": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\nn = long 0\nm = long 0\nfor i ulong len numbers\nv = get numbers i\nif or eq i 0 gt v m\nm = v\nend\nput res i m\nn = add n 1\nend\nret n\nend\n\nfn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 0, + "stdout": "MultiPL-E Omega: all tests passed\n", + "stderr": "", + "status": "OK", + "om_status": "pass", + "om_case": null, + "timestamp": 1793102754 + } + ] +} diff --git a/bench/results/hand/summary.json b/bench/results/hand/summary.json new file mode 100644 index 0000000..695cb65 --- /dev/null +++ b/bench/results/hand/summary.json @@ -0,0 +1,90 @@ +{ + "dir": "hand", + "problems": 10, + "pass@1": 1.0, + "om_status": { + "pass": 10 + }, + "per_problem": [ + { + "name": "HumanEval_0_has_close_elements", + "n": 1, + "c": 1, + "om_status": [ + "pass" + ] + }, + { + "name": "HumanEval_13_greatest_common_divisor", + "n": 1, + "c": 1, + "om_status": [ + "pass" + ] + }, + { + "name": "HumanEval_16_count_distinct_characters", + "n": 1, + "c": 1, + "om_status": [ + "pass" + ] + }, + { + "name": "HumanEval_27_flip_case", + "n": 1, + "c": 1, + "om_status": [ + "pass" + ] + }, + { + "name": "HumanEval_2_truncate_number", + "n": 1, + "c": 1, + "om_status": [ + "pass" + ] + }, + { + "name": "HumanEval_30_get_positive", + "n": 1, + "c": 1, + "om_status": [ + "pass" + ] + }, + { + "name": "HumanEval_3_below_zero", + "n": 1, + "c": 1, + "om_status": [ + "pass" + ] + }, + { + "name": "HumanEval_48_is_palindrome", + "n": 1, + "c": 1, + "om_status": [ + "pass" + ] + }, + { + "name": "HumanEval_53_add", + "n": 1, + "c": 1, + "om_status": [ + "pass" + ] + }, + { + "name": "HumanEval_9_rolling_max", + "n": 1, + "c": 1, + "om_status": [ + "pass" + ] + } + ] +} diff --git a/bench/results/invalid/HumanEval_0_has_close_elements.json b/bench/results/invalid/HumanEval_0_has_close_elements.json new file mode 100644 index 0000000..34cdaa5 --- /dev/null +++ b/bench/results/invalid/HumanEval_0_has_close_elements.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_0_has_close_elements", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\n", + "tests": "fn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "this is ( not Omega\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid" +} diff --git a/bench/results/invalid/HumanEval_0_has_close_elements.results.json b/bench/results/invalid/HumanEval_0_has_close_elements.results.json new file mode 100644 index 0000000..75e951b --- /dev/null +++ b/bench/results/invalid/HumanEval_0_has_close_elements.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_0_has_close_elements", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\n", + "tests": "fn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid", + "results": [ + { + "program": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\nthis is ( not Omega\nend\n\nfn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "status": "SyntaxError", + "exit_code": 3, + "stdout": "", + "stderr": "omc: line 10: error 3\n", + "om_status": "compile_error", + "om_case": 3, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/invalid/HumanEval_13_greatest_common_divisor.json b/bench/results/invalid/HumanEval_13_greatest_common_divisor.json new file mode 100644 index 0000000..1bab970 --- /dev/null +++ b/bench/results/invalid/HumanEval_13_greatest_common_divisor.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_13_greatest_common_divisor", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\n", + "tests": "fn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "this is ( not Omega\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid" +} diff --git a/bench/results/invalid/HumanEval_13_greatest_common_divisor.results.json b/bench/results/invalid/HumanEval_13_greatest_common_divisor.results.json new file mode 100644 index 0000000..09ea484 --- /dev/null +++ b/bench/results/invalid/HumanEval_13_greatest_common_divisor.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_13_greatest_common_divisor", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\n", + "tests": "fn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid", + "results": [ + { + "program": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\nthis is ( not Omega\nend\n\nfn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "status": "SyntaxError", + "exit_code": 3, + "stdout": "", + "stderr": "omc: line 8: error 3\n", + "om_status": "compile_error", + "om_case": 3, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/invalid/HumanEval_16_count_distinct_characters.json b/bench/results/invalid/HumanEval_16_count_distinct_characters.json new file mode 100644 index 0000000..ba9e26a --- /dev/null +++ b/bench/results/invalid/HumanEval_16_count_distinct_characters.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_16_count_distinct_characters", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "this is ( not Omega\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid" +} diff --git a/bench/results/invalid/HumanEval_16_count_distinct_characters.results.json b/bench/results/invalid/HumanEval_16_count_distinct_characters.results.json new file mode 100644 index 0000000..b75a3bf --- /dev/null +++ b/bench/results/invalid/HumanEval_16_count_distinct_characters.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_16_count_distinct_characters", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid", + "results": [ + { + "program": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\nthis is ( not Omega\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "status": "SyntaxError", + "exit_code": 3, + "stdout": "", + "stderr": "omc: line 8: error 3\n", + "om_status": "compile_error", + "om_case": 3, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/invalid/HumanEval_27_flip_case.json b/bench/results/invalid/HumanEval_27_flip_case.json new file mode 100644 index 0000000..c9bae3e --- /dev/null +++ b/bench/results/invalid/HumanEval_27_flip_case.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_27_flip_case", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "this is ( not Omega\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid" +} diff --git a/bench/results/invalid/HumanEval_27_flip_case.results.json b/bench/results/invalid/HumanEval_27_flip_case.results.json new file mode 100644 index 0000000..ce81b43 --- /dev/null +++ b/bench/results/invalid/HumanEval_27_flip_case.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_27_flip_case", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid", + "results": [ + { + "program": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\nthis is ( not Omega\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "status": "SyntaxError", + "exit_code": 3, + "stdout": "", + "stderr": "omc: line 7: error 3\n", + "om_status": "compile_error", + "om_case": 3, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/invalid/HumanEval_2_truncate_number.json b/bench/results/invalid/HumanEval_2_truncate_number.json new file mode 100644 index 0000000..930090f --- /dev/null +++ b/bench/results/invalid/HumanEval_2_truncate_number.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_2_truncate_number", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\n", + "tests": "fn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "this is ( not Omega\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid" +} diff --git a/bench/results/invalid/HumanEval_2_truncate_number.results.json b/bench/results/invalid/HumanEval_2_truncate_number.results.json new file mode 100644 index 0000000..1ea653a --- /dev/null +++ b/bench/results/invalid/HumanEval_2_truncate_number.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_2_truncate_number", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\n", + "tests": "fn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid", + "results": [ + { + "program": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\nthis is ( not Omega\nend\n\nfn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "status": "SyntaxError", + "exit_code": 3, + "stdout": "", + "stderr": "omc: line 10: error 3\n", + "om_status": "compile_error", + "om_case": 3, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/invalid/HumanEval_30_get_positive.json b/bench/results/invalid/HumanEval_30_get_positive.json new file mode 100644 index 0000000..f465344 --- /dev/null +++ b/bench/results/invalid/HumanEval_30_get_positive.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_30_get_positive", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "this is ( not Omega\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid" +} diff --git a/bench/results/invalid/HumanEval_30_get_positive.results.json b/bench/results/invalid/HumanEval_30_get_positive.results.json new file mode 100644 index 0000000..0aeb704 --- /dev/null +++ b/bench/results/invalid/HumanEval_30_get_positive.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_30_get_positive", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid", + "results": [ + { + "program": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\nthis is ( not Omega\nend\n\nfn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "status": "SyntaxError", + "exit_code": 3, + "stdout": "", + "stderr": "omc: line 9: error 3\n", + "om_status": "compile_error", + "om_case": 3, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/invalid/HumanEval_3_below_zero.json b/bench/results/invalid/HumanEval_3_below_zero.json new file mode 100644 index 0000000..4f538e7 --- /dev/null +++ b/bench/results/invalid/HumanEval_3_below_zero.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_3_below_zero", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "this is ( not Omega\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid" +} diff --git a/bench/results/invalid/HumanEval_3_below_zero.results.json b/bench/results/invalid/HumanEval_3_below_zero.results.json new file mode 100644 index 0000000..9e79796 --- /dev/null +++ b/bench/results/invalid/HumanEval_3_below_zero.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_3_below_zero", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid", + "results": [ + { + "program": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\nthis is ( not Omega\nend\n\nfn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "status": "SyntaxError", + "exit_code": 3, + "stdout": "", + "stderr": "omc: line 11: error 3\n", + "om_status": "compile_error", + "om_case": 3, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/invalid/HumanEval_48_is_palindrome.json b/bench/results/invalid/HumanEval_48_is_palindrome.json new file mode 100644 index 0000000..1dcd25e --- /dev/null +++ b/bench/results/invalid/HumanEval_48_is_palindrome.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_48_is_palindrome", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "this is ( not Omega\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid" +} diff --git a/bench/results/invalid/HumanEval_48_is_palindrome.results.json b/bench/results/invalid/HumanEval_48_is_palindrome.results.json new file mode 100644 index 0000000..0fc2118 --- /dev/null +++ b/bench/results/invalid/HumanEval_48_is_palindrome.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_48_is_palindrome", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid", + "results": [ + { + "program": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\nthis is ( not Omega\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "status": "SyntaxError", + "exit_code": 3, + "stdout": "", + "stderr": "omc: line 13: error 3\n", + "om_status": "compile_error", + "om_case": 3, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/invalid/HumanEval_53_add.json b/bench/results/invalid/HumanEval_53_add.json new file mode 100644 index 0000000..71fabba --- /dev/null +++ b/bench/results/invalid/HumanEval_53_add.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_53_add", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\n", + "tests": "fn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "this is ( not Omega\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid" +} diff --git a/bench/results/invalid/HumanEval_53_add.results.json b/bench/results/invalid/HumanEval_53_add.results.json new file mode 100644 index 0000000..4d2ec87 --- /dev/null +++ b/bench/results/invalid/HumanEval_53_add.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_53_add", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\n", + "tests": "fn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid", + "results": [ + { + "program": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\nthis is ( not Omega\nend\n\nfn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "status": "SyntaxError", + "exit_code": 3, + "stdout": "", + "stderr": "omc: line 9: error 3\n", + "om_status": "compile_error", + "om_case": 3, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/invalid/HumanEval_9_rolling_max.json b/bench/results/invalid/HumanEval_9_rolling_max.json new file mode 100644 index 0000000..8805a60 --- /dev/null +++ b/bench/results/invalid/HumanEval_9_rolling_max.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_9_rolling_max", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "this is ( not Omega\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid" +} diff --git a/bench/results/invalid/HumanEval_9_rolling_max.results.json b/bench/results/invalid/HumanEval_9_rolling_max.results.json new file mode 100644 index 0000000..97d63ed --- /dev/null +++ b/bench/results/invalid/HumanEval_9_rolling_max.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_9_rolling_max", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "invalid", + "results": [ + { + "program": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\nthis is ( not Omega\nend\n\nfn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "status": "SyntaxError", + "exit_code": 3, + "stdout": "", + "stderr": "omc: line 8: error 3\n", + "om_status": "compile_error", + "om_case": 3, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/invalid/summary.json b/bench/results/invalid/summary.json new file mode 100644 index 0000000..4976a4c --- /dev/null +++ b/bench/results/invalid/summary.json @@ -0,0 +1,90 @@ +{ + "dir": "invalid", + "problems": 10, + "pass@1": 0.0, + "om_status": { + "compile_error": 10 + }, + "per_problem": [ + { + "name": "HumanEval_0_has_close_elements", + "n": 1, + "c": 0, + "om_status": [ + "compile_error" + ] + }, + { + "name": "HumanEval_13_greatest_common_divisor", + "n": 1, + "c": 0, + "om_status": [ + "compile_error" + ] + }, + { + "name": "HumanEval_16_count_distinct_characters", + "n": 1, + "c": 0, + "om_status": [ + "compile_error" + ] + }, + { + "name": "HumanEval_27_flip_case", + "n": 1, + "c": 0, + "om_status": [ + "compile_error" + ] + }, + { + "name": "HumanEval_2_truncate_number", + "n": 1, + "c": 0, + "om_status": [ + "compile_error" + ] + }, + { + "name": "HumanEval_30_get_positive", + "n": 1, + "c": 0, + "om_status": [ + "compile_error" + ] + }, + { + "name": "HumanEval_3_below_zero", + "n": 1, + "c": 0, + "om_status": [ + "compile_error" + ] + }, + { + "name": "HumanEval_48_is_palindrome", + "n": 1, + "c": 0, + "om_status": [ + "compile_error" + ] + }, + { + "name": "HumanEval_53_add", + "n": 1, + "c": 0, + "om_status": [ + "compile_error" + ] + }, + { + "name": "HumanEval_9_rolling_max", + "n": 1, + "c": 0, + "om_status": [ + "compile_error" + ] + } + ] +} diff --git a/bench/results/timeout/HumanEval_0_has_close_elements.json b/bench/results/timeout/HumanEval_0_has_close_elements.json new file mode 100644 index 0000000..4bf075f --- /dev/null +++ b/bench/results/timeout/HumanEval_0_has_close_elements.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_0_has_close_elements", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\n", + "tests": "fn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret false\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout" +} diff --git a/bench/results/timeout/HumanEval_0_has_close_elements.results.json b/bench/results/timeout/HumanEval_0_has_close_elements.results.json new file mode 100644 index 0000000..fcbc151 --- /dev/null +++ b/bench/results/timeout/HumanEval_0_has_close_elements.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_0_has_close_elements", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\n", + "tests": "fn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout", + "results": [ + { + "program": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\nn = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret false\nend\n\nfn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": -1, + "stdout": "", + "stderr": "", + "status": "Timeout", + "om_status": "timeout", + "om_case": null, + "timestamp": 1793102758 + } + ] +} diff --git a/bench/results/timeout/HumanEval_13_greatest_common_divisor.json b/bench/results/timeout/HumanEval_13_greatest_common_divisor.json new file mode 100644 index 0000000..860a3ff --- /dev/null +++ b/bench/results/timeout/HumanEval_13_greatest_common_divisor.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_13_greatest_common_divisor", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\n", + "tests": "fn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout" +} diff --git a/bench/results/timeout/HumanEval_13_greatest_common_divisor.results.json b/bench/results/timeout/HumanEval_13_greatest_common_divisor.results.json new file mode 100644 index 0000000..6dffb96 --- /dev/null +++ b/bench/results/timeout/HumanEval_13_greatest_common_divisor.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_13_greatest_common_divisor", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\n", + "tests": "fn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout", + "results": [ + { + "program": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\nn = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0\nend\n\nfn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": -1, + "stdout": "", + "stderr": "", + "status": "Timeout", + "om_status": "timeout", + "om_case": null, + "timestamp": 1793102760 + } + ] +} diff --git a/bench/results/timeout/HumanEval_16_count_distinct_characters.json b/bench/results/timeout/HumanEval_16_count_distinct_characters.json new file mode 100644 index 0000000..54a4df5 --- /dev/null +++ b/bench/results/timeout/HumanEval_16_count_distinct_characters.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_16_count_distinct_characters", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout" +} diff --git a/bench/results/timeout/HumanEval_16_count_distinct_characters.results.json b/bench/results/timeout/HumanEval_16_count_distinct_characters.results.json new file mode 100644 index 0000000..677731b --- /dev/null +++ b/bench/results/timeout/HumanEval_16_count_distinct_characters.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_16_count_distinct_characters", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout", + "results": [ + { + "program": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\nn = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": -1, + "stdout": "", + "stderr": "", + "status": "Timeout", + "om_status": "timeout", + "om_case": null, + "timestamp": 1793102762 + } + ] +} diff --git a/bench/results/timeout/HumanEval_27_flip_case.json b/bench/results/timeout/HumanEval_27_flip_case.json new file mode 100644 index 0000000..25d38d0 --- /dev/null +++ b/bench/results/timeout/HumanEval_27_flip_case.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_27_flip_case", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout" +} diff --git a/bench/results/timeout/HumanEval_27_flip_case.results.json b/bench/results/timeout/HumanEval_27_flip_case.results.json new file mode 100644 index 0000000..519d49a --- /dev/null +++ b/bench/results/timeout/HumanEval_27_flip_case.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_27_flip_case", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout", + "results": [ + { + "program": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\nn = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": -1, + "stdout": "", + "stderr": "", + "status": "Timeout", + "om_status": "timeout", + "om_case": null, + "timestamp": 1793102764 + } + ] +} diff --git a/bench/results/timeout/HumanEval_2_truncate_number.json b/bench/results/timeout/HumanEval_2_truncate_number.json new file mode 100644 index 0000000..da0c2c3 --- /dev/null +++ b/bench/results/timeout/HumanEval_2_truncate_number.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_2_truncate_number", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\n", + "tests": "fn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0.0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout" +} diff --git a/bench/results/timeout/HumanEval_2_truncate_number.results.json b/bench/results/timeout/HumanEval_2_truncate_number.results.json new file mode 100644 index 0000000..a0bd353 --- /dev/null +++ b/bench/results/timeout/HumanEval_2_truncate_number.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_2_truncate_number", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\n", + "tests": "fn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout", + "results": [ + { + "program": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\nn = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0.0\nend\n\nfn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": -1, + "stdout": "", + "stderr": "", + "status": "Timeout", + "om_status": "timeout", + "om_case": null, + "timestamp": 1793102766 + } + ] +} diff --git a/bench/results/timeout/HumanEval_30_get_positive.json b/bench/results/timeout/HumanEval_30_get_positive.json new file mode 100644 index 0000000..59f1584 --- /dev/null +++ b/bench/results/timeout/HumanEval_30_get_positive.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_30_get_positive", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout" +} diff --git a/bench/results/timeout/HumanEval_30_get_positive.results.json b/bench/results/timeout/HumanEval_30_get_positive.results.json new file mode 100644 index 0000000..948a695 --- /dev/null +++ b/bench/results/timeout/HumanEval_30_get_positive.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_30_get_positive", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout", + "results": [ + { + "program": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\nn = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0\nend\n\nfn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": -1, + "stdout": "", + "stderr": "", + "status": "Timeout", + "om_status": "timeout", + "om_case": null, + "timestamp": 1793102769 + } + ] +} diff --git a/bench/results/timeout/HumanEval_3_below_zero.json b/bench/results/timeout/HumanEval_3_below_zero.json new file mode 100644 index 0000000..9447308 --- /dev/null +++ b/bench/results/timeout/HumanEval_3_below_zero.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_3_below_zero", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret false\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout" +} diff --git a/bench/results/timeout/HumanEval_3_below_zero.results.json b/bench/results/timeout/HumanEval_3_below_zero.results.json new file mode 100644 index 0000000..2e0a72f --- /dev/null +++ b/bench/results/timeout/HumanEval_3_below_zero.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_3_below_zero", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout", + "results": [ + { + "program": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\nn = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret false\nend\n\nfn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": -1, + "stdout": "", + "stderr": "", + "status": "Timeout", + "om_status": "timeout", + "om_case": null, + "timestamp": 1793102771 + } + ] +} diff --git a/bench/results/timeout/HumanEval_48_is_palindrome.json b/bench/results/timeout/HumanEval_48_is_palindrome.json new file mode 100644 index 0000000..74b7855 --- /dev/null +++ b/bench/results/timeout/HumanEval_48_is_palindrome.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_48_is_palindrome", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret false\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout" +} diff --git a/bench/results/timeout/HumanEval_48_is_palindrome.results.json b/bench/results/timeout/HumanEval_48_is_palindrome.results.json new file mode 100644 index 0000000..26833dc --- /dev/null +++ b/bench/results/timeout/HumanEval_48_is_palindrome.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_48_is_palindrome", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout", + "results": [ + { + "program": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\nn = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret false\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": -1, + "stdout": "", + "stderr": "", + "status": "Timeout", + "om_status": "timeout", + "om_case": null, + "timestamp": 1793102773 + } + ] +} diff --git a/bench/results/timeout/HumanEval_53_add.json b/bench/results/timeout/HumanEval_53_add.json new file mode 100644 index 0000000..2a4fcbc --- /dev/null +++ b/bench/results/timeout/HumanEval_53_add.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_53_add", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\n", + "tests": "fn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout" +} diff --git a/bench/results/timeout/HumanEval_53_add.results.json b/bench/results/timeout/HumanEval_53_add.results.json new file mode 100644 index 0000000..ab61d88 --- /dev/null +++ b/bench/results/timeout/HumanEval_53_add.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_53_add", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\n", + "tests": "fn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout", + "results": [ + { + "program": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\nn = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0\nend\n\nfn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": -1, + "stdout": "", + "stderr": "", + "status": "Timeout", + "om_status": "timeout", + "om_case": null, + "timestamp": 1793102775 + } + ] +} diff --git a/bench/results/timeout/HumanEval_9_rolling_max.json b/bench/results/timeout/HumanEval_9_rolling_max.json new file mode 100644 index 0000000..5f5a0c0 --- /dev/null +++ b/bench/results/timeout/HumanEval_9_rolling_max.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_9_rolling_max", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "n = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout" +} diff --git a/bench/results/timeout/HumanEval_9_rolling_max.results.json b/bench/results/timeout/HumanEval_9_rolling_max.results.json new file mode 100644 index 0000000..32edaba --- /dev/null +++ b/bench/results/timeout/HumanEval_9_rolling_max.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_9_rolling_max", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "timeout", + "results": [ + { + "program": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\nn = ulong 0\nfor i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\nn = xor n k\nend\nend\nend\nret 0\nend\n\nfn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": -1, + "stdout": "", + "stderr": "", + "status": "Timeout", + "om_status": "timeout", + "om_case": null, + "timestamp": 1793102777 + } + ] +} diff --git a/bench/results/timeout/summary.json b/bench/results/timeout/summary.json new file mode 100644 index 0000000..4b7c612 --- /dev/null +++ b/bench/results/timeout/summary.json @@ -0,0 +1,90 @@ +{ + "dir": "timeout", + "problems": 10, + "pass@1": 0.0, + "om_status": { + "timeout": 10 + }, + "per_problem": [ + { + "name": "HumanEval_0_has_close_elements", + "n": 1, + "c": 0, + "om_status": [ + "timeout" + ] + }, + { + "name": "HumanEval_13_greatest_common_divisor", + "n": 1, + "c": 0, + "om_status": [ + "timeout" + ] + }, + { + "name": "HumanEval_16_count_distinct_characters", + "n": 1, + "c": 0, + "om_status": [ + "timeout" + ] + }, + { + "name": "HumanEval_27_flip_case", + "n": 1, + "c": 0, + "om_status": [ + "timeout" + ] + }, + { + "name": "HumanEval_2_truncate_number", + "n": 1, + "c": 0, + "om_status": [ + "timeout" + ] + }, + { + "name": "HumanEval_30_get_positive", + "n": 1, + "c": 0, + "om_status": [ + "timeout" + ] + }, + { + "name": "HumanEval_3_below_zero", + "n": 1, + "c": 0, + "om_status": [ + "timeout" + ] + }, + { + "name": "HumanEval_48_is_palindrome", + "n": 1, + "c": 0, + "om_status": [ + "timeout" + ] + }, + { + "name": "HumanEval_53_add", + "n": 1, + "c": 0, + "om_status": [ + "timeout" + ] + }, + { + "name": "HumanEval_9_rolling_max", + "n": 1, + "c": 0, + "om_status": [ + "timeout" + ] + } + ] +} diff --git a/bench/results/trap/HumanEval_0_has_close_elements.json b/bench/results/trap/HumanEval_0_has_close_elements.json new file mode 100644 index 0000000..f4005d5 --- /dev/null +++ b/bench/results/trap/HumanEval_0_has_close_elements.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_0_has_close_elements", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\n", + "tests": "fn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "trap 5\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap" +} diff --git a/bench/results/trap/HumanEval_0_has_close_elements.results.json b/bench/results/trap/HumanEval_0_has_close_elements.results.json new file mode 100644 index 0000000..bd2c2af --- /dev/null +++ b/bench/results/trap/HumanEval_0_has_close_elements.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_0_has_close_elements", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\n", + "tests": "fn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap", + "results": [ + { + "program": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\ntrap 5\nend\n\nfn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 105, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "trap", + "om_case": 5, + "timestamp": 1793102756 + } + ] +} diff --git a/bench/results/trap/HumanEval_13_greatest_common_divisor.json b/bench/results/trap/HumanEval_13_greatest_common_divisor.json new file mode 100644 index 0000000..2715eeb --- /dev/null +++ b/bench/results/trap/HumanEval_13_greatest_common_divisor.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_13_greatest_common_divisor", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\n", + "tests": "fn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "trap 5\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap" +} diff --git a/bench/results/trap/HumanEval_13_greatest_common_divisor.results.json b/bench/results/trap/HumanEval_13_greatest_common_divisor.results.json new file mode 100644 index 0000000..0a51dc2 --- /dev/null +++ b/bench/results/trap/HumanEval_13_greatest_common_divisor.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_13_greatest_common_divisor", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\n", + "tests": "fn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap", + "results": [ + { + "program": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\ntrap 5\nend\n\nfn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 105, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "trap", + "om_case": 5, + "timestamp": 1793102756 + } + ] +} diff --git a/bench/results/trap/HumanEval_16_count_distinct_characters.json b/bench/results/trap/HumanEval_16_count_distinct_characters.json new file mode 100644 index 0000000..d2ff769 --- /dev/null +++ b/bench/results/trap/HumanEval_16_count_distinct_characters.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_16_count_distinct_characters", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "trap 5\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap" +} diff --git a/bench/results/trap/HumanEval_16_count_distinct_characters.results.json b/bench/results/trap/HumanEval_16_count_distinct_characters.results.json new file mode 100644 index 0000000..ad40ddf --- /dev/null +++ b/bench/results/trap/HumanEval_16_count_distinct_characters.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_16_count_distinct_characters", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap", + "results": [ + { + "program": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\ntrap 5\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 105, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "trap", + "om_case": 5, + "timestamp": 1793102756 + } + ] +} diff --git a/bench/results/trap/HumanEval_27_flip_case.json b/bench/results/trap/HumanEval_27_flip_case.json new file mode 100644 index 0000000..2df574b --- /dev/null +++ b/bench/results/trap/HumanEval_27_flip_case.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_27_flip_case", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "trap 5\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap" +} diff --git a/bench/results/trap/HumanEval_27_flip_case.results.json b/bench/results/trap/HumanEval_27_flip_case.results.json new file mode 100644 index 0000000..dec332d --- /dev/null +++ b/bench/results/trap/HumanEval_27_flip_case.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_27_flip_case", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap", + "results": [ + { + "program": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\ntrap 5\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 105, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "trap", + "om_case": 5, + "timestamp": 1793102756 + } + ] +} diff --git a/bench/results/trap/HumanEval_2_truncate_number.json b/bench/results/trap/HumanEval_2_truncate_number.json new file mode 100644 index 0000000..ddad798 --- /dev/null +++ b/bench/results/trap/HumanEval_2_truncate_number.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_2_truncate_number", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\n", + "tests": "fn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "trap 5\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap" +} diff --git a/bench/results/trap/HumanEval_2_truncate_number.results.json b/bench/results/trap/HumanEval_2_truncate_number.results.json new file mode 100644 index 0000000..8312648 --- /dev/null +++ b/bench/results/trap/HumanEval_2_truncate_number.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_2_truncate_number", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\n", + "tests": "fn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap", + "results": [ + { + "program": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\ntrap 5\nend\n\nfn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 105, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "trap", + "om_case": 5, + "timestamp": 1793102756 + } + ] +} diff --git a/bench/results/trap/HumanEval_30_get_positive.json b/bench/results/trap/HumanEval_30_get_positive.json new file mode 100644 index 0000000..c4f0764 --- /dev/null +++ b/bench/results/trap/HumanEval_30_get_positive.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_30_get_positive", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "trap 5\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap" +} diff --git a/bench/results/trap/HumanEval_30_get_positive.results.json b/bench/results/trap/HumanEval_30_get_positive.results.json new file mode 100644 index 0000000..1fb6656 --- /dev/null +++ b/bench/results/trap/HumanEval_30_get_positive.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_30_get_positive", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap", + "results": [ + { + "program": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\ntrap 5\nend\n\nfn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 105, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "trap", + "om_case": 5, + "timestamp": 1793102756 + } + ] +} diff --git a/bench/results/trap/HumanEval_3_below_zero.json b/bench/results/trap/HumanEval_3_below_zero.json new file mode 100644 index 0000000..3953560 --- /dev/null +++ b/bench/results/trap/HumanEval_3_below_zero.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_3_below_zero", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "trap 5\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap" +} diff --git a/bench/results/trap/HumanEval_3_below_zero.results.json b/bench/results/trap/HumanEval_3_below_zero.results.json new file mode 100644 index 0000000..7bb9fc6 --- /dev/null +++ b/bench/results/trap/HumanEval_3_below_zero.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_3_below_zero", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap", + "results": [ + { + "program": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\ntrap 5\nend\n\nfn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 105, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "trap", + "om_case": 5, + "timestamp": 1793102756 + } + ] +} diff --git a/bench/results/trap/HumanEval_48_is_palindrome.json b/bench/results/trap/HumanEval_48_is_palindrome.json new file mode 100644 index 0000000..454770c --- /dev/null +++ b/bench/results/trap/HumanEval_48_is_palindrome.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_48_is_palindrome", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "trap 5\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap" +} diff --git a/bench/results/trap/HumanEval_48_is_palindrome.results.json b/bench/results/trap/HumanEval_48_is_palindrome.results.json new file mode 100644 index 0000000..3fe9b55 --- /dev/null +++ b/bench/results/trap/HumanEval_48_is_palindrome.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_48_is_palindrome", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap", + "results": [ + { + "program": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\ntrap 5\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 105, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "trap", + "om_case": 5, + "timestamp": 1793102756 + } + ] +} diff --git a/bench/results/trap/HumanEval_53_add.json b/bench/results/trap/HumanEval_53_add.json new file mode 100644 index 0000000..0b89579 --- /dev/null +++ b/bench/results/trap/HumanEval_53_add.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_53_add", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\n", + "tests": "fn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "trap 5\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap" +} diff --git a/bench/results/trap/HumanEval_53_add.results.json b/bench/results/trap/HumanEval_53_add.results.json new file mode 100644 index 0000000..b9af97f --- /dev/null +++ b/bench/results/trap/HumanEval_53_add.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_53_add", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\n", + "tests": "fn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap", + "results": [ + { + "program": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\ntrap 5\nend\n\nfn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 105, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "trap", + "om_case": 5, + "timestamp": 1793102756 + } + ] +} diff --git a/bench/results/trap/HumanEval_9_rolling_max.json b/bench/results/trap/HumanEval_9_rolling_max.json new file mode 100644 index 0000000..6e413db --- /dev/null +++ b/bench/results/trap/HumanEval_9_rolling_max.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_9_rolling_max", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "trap 5\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap" +} diff --git a/bench/results/trap/HumanEval_9_rolling_max.results.json b/bench/results/trap/HumanEval_9_rolling_max.results.json new file mode 100644 index 0000000..6977553 --- /dev/null +++ b/bench/results/trap/HumanEval_9_rolling_max.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_9_rolling_max", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "trap", + "results": [ + { + "program": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\ntrap 5\nend\n\nfn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 105, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "trap", + "om_case": 5, + "timestamp": 1793102756 + } + ] +} diff --git a/bench/results/trap/summary.json b/bench/results/trap/summary.json new file mode 100644 index 0000000..080fd5c --- /dev/null +++ b/bench/results/trap/summary.json @@ -0,0 +1,90 @@ +{ + "dir": "trap", + "problems": 10, + "pass@1": 0.0, + "om_status": { + "trap": 10 + }, + "per_problem": [ + { + "name": "HumanEval_0_has_close_elements", + "n": 1, + "c": 0, + "om_status": [ + "trap" + ] + }, + { + "name": "HumanEval_13_greatest_common_divisor", + "n": 1, + "c": 0, + "om_status": [ + "trap" + ] + }, + { + "name": "HumanEval_16_count_distinct_characters", + "n": 1, + "c": 0, + "om_status": [ + "trap" + ] + }, + { + "name": "HumanEval_27_flip_case", + "n": 1, + "c": 0, + "om_status": [ + "trap" + ] + }, + { + "name": "HumanEval_2_truncate_number", + "n": 1, + "c": 0, + "om_status": [ + "trap" + ] + }, + { + "name": "HumanEval_30_get_positive", + "n": 1, + "c": 0, + "om_status": [ + "trap" + ] + }, + { + "name": "HumanEval_3_below_zero", + "n": 1, + "c": 0, + "om_status": [ + "trap" + ] + }, + { + "name": "HumanEval_48_is_palindrome", + "n": 1, + "c": 0, + "om_status": [ + "trap" + ] + }, + { + "name": "HumanEval_53_add", + "n": 1, + "c": 0, + "om_status": [ + "trap" + ] + }, + { + "name": "HumanEval_9_rolling_max", + "n": 1, + "c": 0, + "om_status": [ + "trap" + ] + } + ] +} diff --git a/bench/results/wrong/HumanEval_0_has_close_elements.json b/bench/results/wrong/HumanEval_0_has_close_elements.json new file mode 100644 index 0000000..b480fca --- /dev/null +++ b/bench/results/wrong/HumanEval_0_has_close_elements.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_0_has_close_elements", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\n", + "tests": "fn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "ret false\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong" +} diff --git a/bench/results/wrong/HumanEval_0_has_close_elements.results.json b/bench/results/wrong/HumanEval_0_has_close_elements.results.json new file mode 100644 index 0000000..e6836e5 --- /dev/null +++ b/bench/results/wrong/HumanEval_0_has_close_elements.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_0_has_close_elements", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\n", + "tests": "fn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong", + "results": [ + { + "program": "om2\nnote Check if in given array of numbers, are any two numbers closer to each other than\nnote given threshold.\nnote >>> has_close_elements [1.0, 2.0, 3.0] 0.5\nnote false\nnote >>> has_close_elements [1.0, 2.8, 3.0, 4.0, 5.0, 2.0] 0.3\nnote true\nnote Omega name: threshold is threshol here.\nfn has_close_elements numbers view f64 * threshol f64 to bool\nret false\nend\n\nfn tc_0 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.3\nret eq r true\nend\nfn tc_1 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.9\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.2\nr = has_close_elements a0 0.05\nret eq r false\nend\nfn tc_2 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.95\nret eq r true\nend\nfn tc_3 to bool\na0 = new f64 5 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 5.9\nput a0 3 4.0\nput a0 4 5.0\nr = has_close_elements a0 0.8\nret eq r false\nend\nfn tc_4 to bool\na0 = new f64 6 0.0\nput a0 0 1.0\nput a0 1 2.0\nput a0 2 3.0\nput a0 3 4.0\nput a0 4 5.0\nput a0 5 2.0\nr = has_close_elements a0 0.1\nret eq r true\nend\nfn tc_5 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 1.0\nret eq r true\nend\nfn tc_6 to bool\na0 = new f64 5 0.0\nput a0 0 1.1\nput a0 1 2.2\nput a0 2 3.1\nput a0 3 4.1\nput a0 4 5.1\nr = has_close_elements a0 0.5\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 1, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "wrong_answer", + "om_case": 0, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/wrong/HumanEval_13_greatest_common_divisor.json b/bench/results/wrong/HumanEval_13_greatest_common_divisor.json new file mode 100644 index 0000000..8fcd656 --- /dev/null +++ b/bench/results/wrong/HumanEval_13_greatest_common_divisor.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_13_greatest_common_divisor", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\n", + "tests": "fn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "ret 0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong" +} diff --git a/bench/results/wrong/HumanEval_13_greatest_common_divisor.results.json b/bench/results/wrong/HumanEval_13_greatest_common_divisor.results.json new file mode 100644 index 0000000..1133d3b --- /dev/null +++ b/bench/results/wrong/HumanEval_13_greatest_common_divisor.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_13_greatest_common_divisor", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\n", + "tests": "fn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong", + "results": [ + { + "program": "om2\nnote Return a greatest common divisor of two integers a and b\nnote >>> greatest_common_divisor 3 5\nnote 1\nnote >>> greatest_common_divisor 25 15\nnote 5\nfn greatest_common_divisor a long b long to long\nret 0\nend\n\nfn tc_0 to bool\nr = greatest_common_divisor 3 7\nret eq r 1\nend\nfn tc_1 to bool\nr = greatest_common_divisor 10 15\nret eq r 5\nend\nfn tc_2 to bool\nr = greatest_common_divisor 49 14\nret eq r 7\nend\nfn tc_3 to bool\nr = greatest_common_divisor 144 60\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 1, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "wrong_answer", + "om_case": 0, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/wrong/HumanEval_16_count_distinct_characters.json b/bench/results/wrong/HumanEval_16_count_distinct_characters.json new file mode 100644 index 0000000..814639c --- /dev/null +++ b/bench/results/wrong/HumanEval_16_count_distinct_characters.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_16_count_distinct_characters", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "ret 0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong" +} diff --git a/bench/results/wrong/HumanEval_16_count_distinct_characters.results.json b/bench/results/wrong/HumanEval_16_count_distinct_characters.results.json new file mode 100644 index 0000000..5498ef3 --- /dev/null +++ b/bench/results/wrong/HumanEval_16_count_distinct_characters.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_16_count_distinct_characters", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong", + "results": [ + { + "program": "om2\nnote Given a string, find out how many distinct characters (regardless of case) does it consist of\nnote >>> count_distinct_characters \"xyzXYZ\"\nnote 3\nnote >>> count_distinct_characters \"Jerry\"\nnote 4\nfn count_distinct_characters string view uchar * to long\nret 0\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nr = count_distinct_characters part a0 0 0\nret eq r 0\nend\ntext t1_0 \"abcde\"\nfn tc_1 to bool\nr = count_distinct_characters t1_0\nret eq r 5\nend\ntext t2_0 \"abcdecadeCADE\"\nfn tc_2 to bool\nr = count_distinct_characters t2_0\nret eq r 5\nend\ntext t3_0 \"aaaaAAAAaaaa\"\nfn tc_3 to bool\nr = count_distinct_characters t3_0\nret eq r 1\nend\ntext t4_0 \"Jerry jERRY JeRRRY\"\nfn tc_4 to bool\nr = count_distinct_characters t4_0\nret eq r 5\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 2, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "wrong_answer", + "om_case": 1, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/wrong/HumanEval_27_flip_case.json b/bench/results/wrong/HumanEval_27_flip_case.json new file mode 100644 index 0000000..6b473ea --- /dev/null +++ b/bench/results/wrong/HumanEval_27_flip_case.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_27_flip_case", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "ret 0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong" +} diff --git a/bench/results/wrong/HumanEval_27_flip_case.results.json b/bench/results/wrong/HumanEval_27_flip_case.results.json new file mode 100644 index 0000000..b6e7f97 --- /dev/null +++ b/bench/results/wrong/HumanEval_27_flip_case.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_27_flip_case", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong", + "results": [ + { + "program": "om2\nnote For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\nnote >>> flip_case \"Hello\"\nnote \"hELLO\"\nnote Result: write the bytes into res (len res >= 4096) and return how many were written.\nfn flip_case string view uchar * res edit uchar * to long\nret 0\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nres = new uchar 4096 0\nr = flip_case part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext t1_0 \"Hello!\"\nfn tc_1 to bool\nres = new uchar 4096 0\nr = flip_case t1_0 res\nif ne r 6\nret false\nend\nif ne get res 0 104\nret false\nend\nif ne get res 1 69\nret false\nend\nif ne get res 2 76\nret false\nend\nif ne get res 3 76\nret false\nend\nif ne get res 4 79\nret false\nend\nif ne get res 5 33\nret false\nend\nret true\nend\ntext t2_0 \"These violent delights have violent ends\"\nfn tc_2 to bool\nres = new uchar 4096 0\nr = flip_case t2_0 res\nif ne r 40\nret false\nend\nif ne get res 0 116\nret false\nend\nif ne get res 1 72\nret false\nend\nif ne get res 2 69\nret false\nend\nif ne get res 3 83\nret false\nend\nif ne get res 4 69\nret false\nend\nif ne get res 5 32\nret false\nend\nif ne get res 6 86\nret false\nend\nif ne get res 7 73\nret false\nend\nif ne get res 8 79\nret false\nend\nif ne get res 9 76\nret false\nend\nif ne get res 10 69\nret false\nend\nif ne get res 11 78\nret false\nend\nif ne get res 12 84\nret false\nend\nif ne get res 13 32\nret false\nend\nif ne get res 14 68\nret false\nend\nif ne get res 15 69\nret false\nend\nif ne get res 16 76\nret false\nend\nif ne get res 17 73\nret false\nend\nif ne get res 18 71\nret false\nend\nif ne get res 19 72\nret false\nend\nif ne get res 20 84\nret false\nend\nif ne get res 21 83\nret false\nend\nif ne get res 22 32\nret false\nend\nif ne get res 23 72\nret false\nend\nif ne get res 24 65\nret false\nend\nif ne get res 25 86\nret false\nend\nif ne get res 26 69\nret false\nend\nif ne get res 27 32\nret false\nend\nif ne get res 28 86\nret false\nend\nif ne get res 29 73\nret false\nend\nif ne get res 30 79\nret false\nend\nif ne get res 31 76\nret false\nend\nif ne get res 32 69\nret false\nend\nif ne get res 33 78\nret false\nend\nif ne get res 34 84\nret false\nend\nif ne get res 35 32\nret false\nend\nif ne get res 36 69\nret false\nend\nif ne get res 37 78\nret false\nend\nif ne get res 38 68\nret false\nend\nif ne get res 39 83\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 2, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "wrong_answer", + "om_case": 1, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/wrong/HumanEval_2_truncate_number.json b/bench/results/wrong/HumanEval_2_truncate_number.json new file mode 100644 index 0000000..9622fea --- /dev/null +++ b/bench/results/wrong/HumanEval_2_truncate_number.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_2_truncate_number", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\n", + "tests": "fn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "ret 0.0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong" +} diff --git a/bench/results/wrong/HumanEval_2_truncate_number.results.json b/bench/results/wrong/HumanEval_2_truncate_number.results.json new file mode 100644 index 0000000..2fe7ff9 --- /dev/null +++ b/bench/results/wrong/HumanEval_2_truncate_number.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_2_truncate_number", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\n", + "tests": "fn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong", + "results": [ + { + "program": "om2\nnote Given a positive floating point number, it can be decomposed into\nnote and integer part (largest integer smaller than given number) and decimals\nnote (leftover part always smaller than 1).\nnote Return the decimal part of the number.\nnote >>> Truncate_number 3.5\nnote 0.5\nnote Omega name: truncate_number is Truncate_number here.\nfn Truncate_number number f64 to f64\nret 0.0\nend\n\nfn tc_0 to bool\nr = Truncate_number 3.5\nret eq r 0.5\nend\nfn tc_1 to bool\nr = Truncate_number 1.25\nret eq r 0.25\nend\nfn tc_2 to bool\nr = Truncate_number 123.0\nret eq r 0.0\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 1, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "wrong_answer", + "om_case": 0, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/wrong/HumanEval_30_get_positive.json b/bench/results/wrong/HumanEval_30_get_positive.json new file mode 100644 index 0000000..cebfe5a --- /dev/null +++ b/bench/results/wrong/HumanEval_30_get_positive.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_30_get_positive", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "ret 0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong" +} diff --git a/bench/results/wrong/HumanEval_30_get_positive.results.json b/bench/results/wrong/HumanEval_30_get_positive.results.json new file mode 100644 index 0000000..0dcbb89 --- /dev/null +++ b/bench/results/wrong/HumanEval_30_get_positive.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_30_get_positive", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong", + "results": [ + { + "program": "om2\nnote Return only positive numbers in the array.\nnote >>> get_positive [-1, 2, -4, 5, 6]\nnote [2, 5, 6]\nnote >>> get_positive [5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]\nnote [5, 3, 2, 3, 9, 123, 1]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn get_positive l view long * res edit long * to long\nret 0\nend\n\nfn tc_0 to bool\na0 = new long 5 0\nput a0 0 -1\nput a0 1 -2\nput a0 2 4\nput a0 3 5\nput a0 4 6\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 3\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 5\nret false\nend\nif ne get res 2 6\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 11 0\nput a0 0 5\nput a0 1 3\nput a0 2 -5\nput a0 3 2\nput a0 4 3\nput a0 5 3\nput a0 6 9\nput a0 7 0\nput a0 8 123\nput a0 9 1\nput a0 10 -10\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 8\nret false\nend\nif ne get res 0 5\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 2\nret false\nend\nif ne get res 3 3\nret false\nend\nif ne get res 4 3\nret false\nend\nif ne get res 5 9\nret false\nend\nif ne get res 6 123\nret false\nend\nif ne get res 7 1\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 2 0\nput a0 0 -1\nput a0 1 -2\nres = new long 4096 0\nr = get_positive a0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = get_positive part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 1, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "wrong_answer", + "om_case": 0, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/wrong/HumanEval_3_below_zero.json b/bench/results/wrong/HumanEval_3_below_zero.json new file mode 100644 index 0000000..8774f64 --- /dev/null +++ b/bench/results/wrong/HumanEval_3_below_zero.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_3_below_zero", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "ret false\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong" +} diff --git a/bench/results/wrong/HumanEval_3_below_zero.results.json b/bench/results/wrong/HumanEval_3_below_zero.results.json new file mode 100644 index 0000000..a5eaee5 --- /dev/null +++ b/bench/results/wrong/HumanEval_3_below_zero.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_3_below_zero", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong", + "results": [ + { + "program": "om2\nnote You're given an array of deposit and withdrawal operations on a bank account that starts with\nnote zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\nnote at that point function should return true. Otherwise it should return false.\nnote >>> below_zero [1, 2, 3]\nnote false\nnote >>> below_zero [1, 2, -4, 5]\nnote true\nnote Omega name: operations is operatio here.\nfn below_zero operatio view long * to bool\nret false\nend\n\nfn tc_0 to bool\na0 = new long 1 0\nr = below_zero part a0 0 0\nret eq r false\nend\nfn tc_1 to bool\na0 = new long 6 0\nput a0 0 1\nput a0 1 2\nput a0 2 -3\nput a0 3 1\nput a0 4 2\nput a0 5 -3\nr = below_zero a0\nret eq r false\nend\nfn tc_2 to bool\na0 = new long 5 0\nput a0 0 1\nput a0 1 2\nput a0 2 -4\nput a0 3 5\nput a0 4 6\nr = below_zero a0\nret eq r true\nend\nfn tc_3 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r false\nend\nfn tc_4 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -1\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -5\nr = below_zero a0\nret eq r true\nend\nfn tc_5 to bool\na0 = new long 8 0\nput a0 0 1\nput a0 1 -2\nput a0 2 2\nput a0 3 -2\nput a0 4 5\nput a0 5 -5\nput a0 6 4\nput a0 7 -4\nr = below_zero a0\nret eq r true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 3, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "wrong_answer", + "om_case": 2, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/wrong/HumanEval_48_is_palindrome.json b/bench/results/wrong/HumanEval_48_is_palindrome.json new file mode 100644 index 0000000..f0b97d9 --- /dev/null +++ b/bench/results/wrong/HumanEval_48_is_palindrome.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_48_is_palindrome", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "ret false\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong" +} diff --git a/bench/results/wrong/HumanEval_48_is_palindrome.results.json b/bench/results/wrong/HumanEval_48_is_palindrome.results.json new file mode 100644 index 0000000..b11c078 --- /dev/null +++ b/bench/results/wrong/HumanEval_48_is_palindrome.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_48_is_palindrome", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\n", + "tests": "fn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong", + "results": [ + { + "program": "om2\nnote Checks if given string is a palindrome\nnote >>> is_palindrome \"\"\nnote true\nnote >>> is_palindrome \"aba\"\nnote true\nnote >>> is_palindrome \"aaaaa\"\nnote true\nnote >>> is_palindrome \"zbcd\"\nnote false\nnote Omega name: text is text_ here.\nfn is_palindrome text_ view uchar * to bool\nret false\nend\n\nfn tc_0 to bool\na0 = new uchar 1 0\nr = is_palindrome part a0 0 0\nret eq r true\nend\ntext t1_0 \"aba\"\nfn tc_1 to bool\nr = is_palindrome t1_0\nret eq r true\nend\ntext t2_0 \"aaaaa\"\nfn tc_2 to bool\nr = is_palindrome t2_0\nret eq r true\nend\ntext t3_0 \"zbcd\"\nfn tc_3 to bool\nr = is_palindrome t3_0\nret eq r false\nend\ntext t4_0 \"xywyx\"\nfn tc_4 to bool\nr = is_palindrome t4_0\nret eq r true\nend\ntext t5_0 \"xywyz\"\nfn tc_5 to bool\nr = is_palindrome t5_0\nret eq r false\nend\ntext t6_0 \"xywzx\"\nfn tc_6 to bool\nr = is_palindrome t6_0\nret eq r false\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nif not tc_5\nret 6\nend\nif not tc_6\nret 7\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 1, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "wrong_answer", + "om_case": 0, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/wrong/HumanEval_53_add.json b/bench/results/wrong/HumanEval_53_add.json new file mode 100644 index 0000000..6331577 --- /dev/null +++ b/bench/results/wrong/HumanEval_53_add.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_53_add", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\n", + "tests": "fn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "ret 0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong" +} diff --git a/bench/results/wrong/HumanEval_53_add.results.json b/bench/results/wrong/HumanEval_53_add.results.json new file mode 100644 index 0000000..6f8fb6d --- /dev/null +++ b/bench/results/wrong/HumanEval_53_add.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_53_add", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\n", + "tests": "fn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong", + "results": [ + { + "program": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\nret 0\nend\n\nfn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 1, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "wrong_answer", + "om_case": 0, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/wrong/HumanEval_9_rolling_max.json b/bench/results/wrong/HumanEval_9_rolling_max.json new file mode 100644 index 0000000..04219e7 --- /dev/null +++ b/bench/results/wrong/HumanEval_9_rolling_max.json @@ -0,0 +1,22 @@ +{ + "name": "HumanEval_9_rolling_max", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "completions": [ + "ret 0\nend\n" + ], + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong" +} diff --git a/bench/results/wrong/HumanEval_9_rolling_max.results.json b/bench/results/wrong/HumanEval_9_rolling_max.results.json new file mode 100644 index 0000000..a637cc2 --- /dev/null +++ b/bench/results/wrong/HumanEval_9_rolling_max.results.json @@ -0,0 +1,31 @@ +{ + "name": "HumanEval_9_rolling_max", + "language": "om", + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\n", + "tests": "fn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "stop_tokens": [ + "\nfn ", + "\nstruct ", + "\nglobal ", + "\ntext ", + "\nconst ", + "\nlayout ", + "\nabstract " + ], + "stub_mode": "wrong", + "results": [ + { + "program": "om2\nnote From a given array of integers, generate an array of rolling maximum element found until given moment\nnote in the sequence.\nnote >>> rolling_max [1, 2, 3, 2, 3, 4, 2]\nnote [1, 2, 3, 3, 3, 4, 4]\nnote Result: write the elements into res (len res >= 4096) and return how many were written.\nfn rolling_max numbers view long * res edit long * to long\nret 0\nend\n\nfn tc_0 to bool\na0 = new long 1 0\nres = new long 4096 0\nr = rolling_max part a0 0 0 res\nif ne r 0\nret false\nend\nret true\nend\nfn tc_1 to bool\na0 = new long 4 0\nput a0 0 1\nput a0 1 2\nput a0 2 3\nput a0 3 4\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 1\nret false\nend\nif ne get res 1 2\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_2 to bool\na0 = new long 4 0\nput a0 0 4\nput a0 1 3\nput a0 2 2\nput a0 3 1\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 4\nret false\nend\nif ne get res 0 4\nret false\nend\nif ne get res 1 4\nret false\nend\nif ne get res 2 4\nret false\nend\nif ne get res 3 4\nret false\nend\nret true\nend\nfn tc_3 to bool\na0 = new long 5 0\nput a0 0 3\nput a0 1 2\nput a0 2 3\nput a0 3 100\nput a0 4 3\nres = new long 4096 0\nr = rolling_max a0 res\nif ne r 5\nret false\nend\nif ne get res 0 3\nret false\nend\nif ne get res 1 3\nret false\nend\nif ne get res 2 3\nret false\nend\nif ne get res 3 100\nret false\nend\nif ne get res 4 100\nret false\nend\nret true\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", + "exit_code": 2, + "stdout": "", + "stderr": "", + "status": "Exception", + "om_status": "wrong_answer", + "om_case": 1, + "timestamp": 1793102755 + } + ] +} diff --git a/bench/results/wrong/summary.json b/bench/results/wrong/summary.json new file mode 100644 index 0000000..44b5486 --- /dev/null +++ b/bench/results/wrong/summary.json @@ -0,0 +1,90 @@ +{ + "dir": "wrong", + "problems": 10, + "pass@1": 0.0, + "om_status": { + "wrong_answer": 10 + }, + "per_problem": [ + { + "name": "HumanEval_0_has_close_elements", + "n": 1, + "c": 0, + "om_status": [ + "wrong_answer" + ] + }, + { + "name": "HumanEval_13_greatest_common_divisor", + "n": 1, + "c": 0, + "om_status": [ + "wrong_answer" + ] + }, + { + "name": "HumanEval_16_count_distinct_characters", + "n": 1, + "c": 0, + "om_status": [ + "wrong_answer" + ] + }, + { + "name": "HumanEval_27_flip_case", + "n": 1, + "c": 0, + "om_status": [ + "wrong_answer" + ] + }, + { + "name": "HumanEval_2_truncate_number", + "n": 1, + "c": 0, + "om_status": [ + "wrong_answer" + ] + }, + { + "name": "HumanEval_30_get_positive", + "n": 1, + "c": 0, + "om_status": [ + "wrong_answer" + ] + }, + { + "name": "HumanEval_3_below_zero", + "n": 1, + "c": 0, + "om_status": [ + "wrong_answer" + ] + }, + { + "name": "HumanEval_48_is_palindrome", + "n": 1, + "c": 0, + "om_status": [ + "wrong_answer" + ] + }, + { + "name": "HumanEval_53_add", + "n": 1, + "c": 0, + "om_status": [ + "wrong_answer" + ] + }, + { + "name": "HumanEval_9_rolling_max", + "n": 1, + "c": 0, + "om_status": [ + "wrong_answer" + ] + } + ] +} diff --git a/bench/score.py b/bench/score.py new file mode 100755 index 0000000..bfd0dde --- /dev/null +++ b/bench/score.py @@ -0,0 +1,102 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +"""Evaluate MultiPL-E completion files with eval_om and summarise pass@k. + + OMEGA_OMC=/path/to/omc score.py [--expect OM_STATUS[:CASE]] DIR [DIR ...] + +For every ``DIR/.json`` this writes ``DIR/.results.json`` in the +format of MultiPL-E ``evaluation/src/main.py`` (the completion record without +``completions``, plus ``results``: program, stdout, stderr, exit_code, status, +timestamp; eval_om also adds om_status / om_case), then prints one JSON summary +line per DIR and writes it to ``DIR/summary.json``. The program is +prompt + completion + "\\n" + tests, exactly as upstream builds it. pass@k is +upstream pass_k.py's unbiased estimator, counting status "OK" with exit_code 0. + +Foreign-harness tooling, not first-party Omega; outside every product path. +""" + +import collections +import json +import sys +import tempfile +import time +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parent / "multipl-e")) +import eval_om # noqa: E402 + + +def estimator(n: int, c: int, k: int) -> float: + """1 - C(n-c, k) / C(n, k), computed as pass_k.py does, without numpy.""" + if n - c < k: + return 1.0 + prod = 1.0 + for i in range(n - c + 1, n + 1): + prod *= 1.0 - k / i + return 1.0 - prod + + +def evaluate(problem: dict) -> list: + results = [] + for completion in problem["completions"]: + program = problem["prompt"] + completion + "\n" + problem["tests"] + with tempfile.NamedTemporaryFile(suffix=".om") as f: + f.write(program.encode("utf-8")) + f.flush() + r = eval_om.eval_script(Path(f.name)) + results.append({"program": program, **r, "timestamp": int(time.time())}) + return results + + +def score_dir(d: Path) -> dict: + per_problem, kinds = [], collections.Counter() + for path in sorted(d.glob("*.json")): + if path.name.endswith(".results.json") or path.name == "summary.json": + continue + problem = json.loads(path.read_text()) + record = {k: v for k, v in problem.items() if k != "completions"} + record["results"] = evaluate(problem) + (d / (path.name[: -len(".json")] + ".results.json")).write_text(json.dumps(record, indent=2) + "\n") + n = len(record["results"]) + c = sum(1 for r in record["results"] if r["status"] == "OK" and r["exit_code"] == 0) + kinds.update(r["om_status"] for r in record["results"]) + per_problem.append({"name": problem["name"], "n": n, "c": c, + "om_status": [r["om_status"] for r in record["results"]]}) + if not per_problem: + raise SystemExit(f"score: no completion files in {d}") + summary = { + "dir": d.name, + "problems": len(per_problem), + "pass@1": sum(estimator(p["n"], p["c"], 1) for p in per_problem) / len(per_problem), + "om_status": dict(sorted(kinds.items())), + "per_problem": per_problem, + } + (d / "summary.json").write_text(json.dumps(summary, indent=2) + "\n") + return summary + + +def main(argv): + expect = None + if argv[:1] == ["--expect"] and len(argv) > 1: + expect, argv = argv[1].split(":"), argv[2:] + if not argv: + print(__doc__, file=sys.stderr) + return 2 + rc = 0 + for d in argv: + s = score_dir(Path(d)) + print(json.dumps({k: v for k, v in s.items() if k != "per_problem"})) + if expect is None: + continue + for p in s["per_problem"]: + results = json.loads((Path(d) / (p["name"] + ".results.json")).read_text())["results"] + for r in results: + got = [r["om_status"]] + ([str(r["om_case"])] if len(expect) > 1 else []) + if got != expect: + print(f"score: FAIL {p['name']}: expected {':'.join(expect)}, got {':'.join(got)}") + rc = 1 + return rc + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff --git a/bench/solutions/HumanEval_0.om b/bench/solutions/HumanEval_0.om new file mode 100644 index 0000000..448824a --- /dev/null +++ b/bench/solutions/HumanEval_0.om @@ -0,0 +1,12 @@ +for i ulong len numbers +for j ulong len numbers +if ne i j +d = fabs sub get numbers i get numbers j +if lt d threshol +ret true +end +end +end +end +ret false +end diff --git a/bench/solutions/HumanEval_13.om b/bench/solutions/HumanEval_13.om new file mode 100644 index 0000000..55b9f17 --- /dev/null +++ b/bench/solutions/HumanEval_13.om @@ -0,0 +1,9 @@ +x = a +y = b +while ne y 0 bound 999999 +t = rem x y +x = y +y = t +end +ret x +end diff --git a/bench/solutions/HumanEval_16.om b/bench/solutions/HumanEval_16.om new file mode 100644 index 0000000..b2cf7a8 --- /dev/null +++ b/bench/solutions/HumanEval_16.om @@ -0,0 +1,14 @@ +seen = new uchar 256 0 +n = long 0 +for i ulong len string +c = get string i +if and ge c 65 le c 90 +c = add c 32 +end +if eq get seen c 0 +put seen c 1 +n = add n 1 +end +end +ret n +end diff --git a/bench/solutions/HumanEval_2.om b/bench/solutions/HumanEval_2.om new file mode 100644 index 0000000..97dec30 --- /dev/null +++ b/bench/solutions/HumanEval_2.om @@ -0,0 +1,3 @@ +w = long number +ret sub number f64 w +end diff --git a/bench/solutions/HumanEval_27.om b/bench/solutions/HumanEval_27.om new file mode 100644 index 0000000..a98b664 --- /dev/null +++ b/bench/solutions/HumanEval_27.om @@ -0,0 +1,15 @@ +n = long 0 +for i ulong len string +c = get string i +if and ge c 97 le c 122 +c = sub c 32 +else +if and ge c 65 le c 90 +c = add c 32 +end +end +put res i c +n = add n 1 +end +ret n +end diff --git a/bench/solutions/HumanEval_3.om b/bench/solutions/HumanEval_3.om new file mode 100644 index 0000000..319a9c5 --- /dev/null +++ b/bench/solutions/HumanEval_3.om @@ -0,0 +1,9 @@ +bal = long 0 +for i ulong len operatio +bal = add bal get operatio i +if lt bal 0 +ret true +end +end +ret false +end diff --git a/bench/solutions/HumanEval_30.om b/bench/solutions/HumanEval_30.om new file mode 100644 index 0000000..6317957 --- /dev/null +++ b/bench/solutions/HumanEval_30.om @@ -0,0 +1,10 @@ +n = long 0 +for i ulong len l +v = get l i +if gt v 0 +put res n v +n = add n 1 +end +end +ret n +end diff --git a/bench/solutions/HumanEval_48.om b/bench/solutions/HumanEval_48.om new file mode 100644 index 0000000..12d5748 --- /dev/null +++ b/bench/solutions/HumanEval_48.om @@ -0,0 +1,9 @@ +n = len text_ +for i ulong n +j = sub sub n 1 i +if ne get text_ i get text_ j +ret false +end +end +ret true +end diff --git a/bench/solutions/HumanEval_53.om b/bench/solutions/HumanEval_53.om new file mode 100644 index 0000000..dab3b4b --- /dev/null +++ b/bench/solutions/HumanEval_53.om @@ -0,0 +1,2 @@ +ret add x y +end diff --git a/bench/solutions/HumanEval_9.om b/bench/solutions/HumanEval_9.om new file mode 100644 index 0000000..deb1282 --- /dev/null +++ b/bench/solutions/HumanEval_9.om @@ -0,0 +1,12 @@ +n = long 0 +m = long 0 +for i ulong len numbers +v = get numbers i +if or eq i 0 gt v m +m = v +end +put res i m +n = add n 1 +end +ret n +end diff --git a/bench/stub_model.py b/bench/stub_model.py new file mode 100755 index 0000000..6aeeba4 --- /dev/null +++ b/bench/stub_model.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +"""Stub "model" for the Omega MultiPL-E harness: writes MultiPL-E completion files +without calling any model server. + + stub_model.py MODE OUTDIR [--prompts bench/prompts/humaneval-om.jsonl] + +One ``.json`` per problem, in the layout ``multipl_e.completions`` writes +(name, language, temperature, top_p, max_tokens, prompt, tests, completions, +stop_tokens), one completion each. Mode ``stub`` covers every problem in the +prompts file; the other modes cover the problems with a hand solution in +bench/solutions/. + +MODE completion expected om_status +hand bench/solutions/HumanEval_.om pass +wrong a constant of the return type (0 / 0.0 / false) wrong_answer +invalid text that is not Omega compile_error +trap trap 5 trap, case 5 +timeout three nested loops of 2^24 (about 2^72 steps) timeout +stub trap 14 (the translator's prompt stub) trap, case 14 + +Foreign-harness tooling, not first-party Omega; outside every product path. +""" + +import json +import re +import sys +from pathlib import Path + +BENCH = Path(__file__).resolve().parent +MODES = ("hand", "wrong", "invalid", "trap", "timeout", "stub") +_RET = re.compile(r"^fn \S+ (?:.* )?to (\w+)$", re.M) + + +def ret_type(prompt: str) -> str: + return list(_RET.finditer(prompt))[-1].group(1) + + +def default(t: str) -> str: + return {"bool": "false", "f64": "0.0"}.get(t, "0") + + +def completion(mode: str, problem: dict, hand: str) -> str: + t = ret_type(problem["prompt"]) + if mode == "hand": + return hand + if mode == "wrong": + return f"ret {default(t)}\nend\n" + if mode == "invalid": + return "this is ( not Omega\nend\n" + if mode == "trap": + return "trap 5\nend\n" + if mode == "timeout": + return ( + "n = ulong 0\n" + "for i ulong 16777216\nfor j ulong 16777216\nfor k ulong 16777216\n" + "n = xor n k\nend\nend\nend\n" + f"ret {default(t)}\nend\n" + ) + if mode == "stub": + return "trap 14\nend\n" + raise ValueError(mode) + + +def main(argv): + if len(argv) < 2 or argv[0] not in MODES: + print(__doc__, file=sys.stderr) + return 2 + mode, out = argv[0], Path(argv[1]) + prompts = Path(argv[3]) if len(argv) > 3 and argv[2] == "--prompts" else BENCH / "prompts/humaneval-om.jsonl" + problems = [json.loads(line) for line in prompts.read_text().splitlines()] + if mode == "stub": + work = [(p, "") for p in problems] + else: + by_number = {p["name"].split("_")[1]: p for p in problems} + sols = sorted((BENCH / "solutions").glob("HumanEval_*.om"), key=lambda s: int(s.stem.split("_")[1])) + work = [] + for sol in sols: + p = by_number.get(sol.stem.split("_")[1]) + if p is None: + print(f"stub_model: {sol.name} has no translated prompt", file=sys.stderr) + return 1 + work.append((p, sol.read_text())) + if not work: + print("stub_model: nothing to write", file=sys.stderr) + return 1 + out.mkdir(parents=True, exist_ok=True) + for p, hand in work: + record = { + "name": p["name"], + "language": p["language"], + "temperature": 0.0, + "top_p": 1.0, + "max_tokens": 0, + "prompt": p["prompt"], + "tests": p["tests"], + "completions": [completion(mode, p, hand)], + "stop_tokens": p["stop_tokens"], + "stub_mode": mode, + } + (out / f"{p['name']}.json").write_text(json.dumps(record, indent=2) + "\n") + print(f"stub_model: {mode}: {len(work)} problems -> {out}") + return 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff --git a/bench/upstream/0001-Add-Omega-OM-2-translator-and-evaluator.patch b/bench/upstream/0001-Add-Omega-OM-2-translator-and-evaluator.patch new file mode 100644 index 0000000..aeff11c --- /dev/null +++ b/bench/upstream/0001-Add-Omega-OM-2-translator-and-evaluator.patch @@ -0,0 +1,677 @@ +From b29c2173d3855117b54b5c7e5bc54f94911a12ff Mon Sep 17 00:00:00 2001 +From: Drake Stapleton +Date: Tue, 27 Oct 2026 06:55:03 -0500 +Subject: [PATCH] Add Omega (OM-2) translator and evaluator + +Adds dataset_builder/humaneval_to_om.py, evaluation/src/eval_om.py, the +Omega row in terms.csv, the om entry in containerized_eval.py and an +evaluation/test_inputs example (HumanEval_53: one passing completion, one +that does not compile). +--- + dataset_builder/humaneval_to_om.py | 445 ++++++++++++++++++ + dataset_builder/terms.csv | 1 + + evaluation/src/containerized_eval.py | 2 + + evaluation/src/eval_om.py | 143 ++++++ + .../om-hand-0.0-keep-HumanEval53.json | 19 + + 5 files changed, 610 insertions(+) + create mode 100644 dataset_builder/humaneval_to_om.py + create mode 100755 evaluation/src/eval_om.py + create mode 100644 evaluation/test_inputs/om-hand-0.0-keep-HumanEval53.json + +diff --git a/dataset_builder/humaneval_to_om.py b/dataset_builder/humaneval_to_om.py +new file mode 100644 +index 0000000..9e7c4a3 +--- /dev/null ++++ b/dataset_builder/humaneval_to_om.py +@@ -0,0 +1,445 @@ ++# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ++"""MultiPL-E translator from the Python benchmarks to Omega (OM-2 profile). ++ ++Foreign-harness adapter: MultiPL-E loads translators as Python classes named ++``Translator`` in ``dataset_builder/humaneval_to_.py``, so this file is Python. It ++is not first-party Omega and is not part of any Omega product path. Every ++program it writes is plain OM-2 for the pinned ``omc`` (see ``bench/README.md`` in ++https://github.com/aien-dev/omega-rosetta). ++ ++Shape of a translated problem:: ++ ++ om2 ++ note ++ note ++ fn NAME PARAM TYPE ... to TYPE ++ ++ ++ ++``main`` returns K+1 when test case K fails (so 1..98), writes the line ++``MPE_OK_LINE`` and returns 0 when every case holds. A trap exits 100+code. ++ ++Type mapping:: ++ ++ int -> long float -> f64 bool -> bool ++ List[int] -> view long * List[float] -> view f64 * ++ str -> view uchar * (bytes; non-ASCII test strings are refused) ++ Tuple[int, int] (homogeneous int/float) -> view long * / view f64 * ++ ++A list, string or tuple RESULT becomes an extra last parameter ``res edit T *`` and ++the function returns the element count as ``long``; the test checks the count and ++then every element. Every other type is refused with a reason (``translate_prompt`` ++returns None and ``self.refusal`` names why). ++""" ++ ++import ast ++import math ++import re ++from typing import List, Optional ++ ++# omega-mv commit whose pinned omc defines this profile. ++OMEGA_MV_PIN = "e5b32567a7aff3ce594e3254a622a846a6cd190b" ++ ++# Every word of the pinned omc keyword tables (seed/omc/omc.om `fn kw` and ++# `fn kw2` at OMEGA_MV_PIN, decoded from their packed little-endian constants). ++# A parameter or function may not use any of these as its name. ++KEYWORDS = frozenset( ++ """ ++ abstract accept add and argcnt argread at big bind bitcast bool bound break byte ++ chdir chmod chown connect const continue cwd devcall devctl div dupfd edit else ++ end envcnt envread eq execprog exit export f32 f64 fabs faccess false fchdir ++ fchmod fclose fdsync field flock fmax fmin fn fopen for fork free fresh fseek ++ fsqrt fstat fsync ftrunc ge get getdnts getegid geteuid getgid getpgid getpid ++ getppid getsid getuid global gt holds i16 i32 i64 i8 if inline int killpid ++ layout le len link listen little long lstat lt makedir mapaddr mapbind mapdrop ++ mapget maphold mapnew mapread mapset mapwrite memfd monons mul ne neg new not ++ note offsetof open ops or out own part peercred pipefds pollfds pread put pwrite ++ random read readlnk realns recv rem renames ret rmdir rotl rotr seal send ++ sendmsg setpgid setsid shl short shr shutdown sizeof sleepns sockname socknew ++ sockopt stat struct sub symlnk syncfs text to trap true truncate u16 u32 u64 u8 ++ uchar uint ulong umask unlink unroll ushort uvmctl view void waitio waitpid ++ while write xor ++ """.split() ++) ++# Names the generated test harness itself declares. ++HARNESS_NAMES = frozenset(["main", "res", "r", "w", "mpe_ok", "om2", "ir"]) ++HARNESS_NAME_RE = re.compile(r"(tc_\d+|t\d+_\d+|a\d+)\Z") ++ ++MAX_LOCAL = 8 # error 13: a non-function name has at most 8 characters ++MAX_FN = 63 # function names ++MAX_SLOTS = 6 # error 9: six parameter slots; an unsized view takes two ++MAX_CASES = 98 # exit codes 1..98 name the failing case; 100+ are traps ++RESULT_CAP = 4096 # minimum capacity of the result array handed to the candidate ++I64_MIN, I64_MAX = -(2**63), 2**63 - 1 ++MPE_OK_LINE = "MultiPL-E Omega: all tests passed" ++ ++ ++class Refused(Exception): ++ """A problem the OM-2 mapping cannot express. ``code`` is the tally key.""" ++ ++ def __init__(self, code: str, detail: str = ""): ++ super().__init__(f"{code}: {detail}" if detail else code) ++ self.code = code ++ self.detail = detail ++ ++ ++class Scalar: ++ def __init__(self, om: str): ++ self.om = om # long | f64 | bool ++ ++ slots = 1 ++ ++ def __repr__(self): ++ return self.om ++ ++ ++class Seq: ++ """A list, string or fixed tuple: an unsized view of `elem`.""" ++ ++ def __init__(self, elem: str, py: str, fixed: Optional[int] = None): ++ self.elem = elem # long | f64 | uchar ++ self.py = py # list | str | tuple ++ self.fixed = fixed ++ ++ slots = 2 ++ ++ def __repr__(self): ++ return f"view {self.elem} *" ++ ++ ++SCALARS = {"int": "long", "float": "f64", "bool": "bool"} ++SEQ_ELEMS = {"int": "long", "float": "f64"} ++ ++ ++def _head(node: ast.expr) -> str: ++ if isinstance(node, ast.Name): ++ return node.id ++ if isinstance(node, ast.Attribute): ++ return node.attr ++ return type(node).__name__ ++ ++ ++def om_type(ann: Optional[ast.expr]): ++ """Map one Python annotation to Scalar/Seq, or raise Refused.""" ++ if ann is None: ++ raise Refused("type:untyped", "parameter or return has no annotation") ++ text = ast.unparse(ann) ++ if isinstance(ann, ast.Constant) and ann.value is None: ++ raise Refused("type:None", "no result value to test") ++ if isinstance(ann, ast.Name): ++ if ann.id in SCALARS: ++ return Scalar(SCALARS[ann.id]) ++ if ann.id == "str": ++ return Seq("uchar", "str") ++ raise Refused(f"type:{ann.id}", text) ++ if isinstance(ann, ast.Subscript): ++ head = _head(ann.value) ++ if head in ("List", "list"): ++ inner = ann.slice ++ if isinstance(inner, ast.Name) and inner.id in SEQ_ELEMS: ++ return Seq(SEQ_ELEMS[inner.id], "list") ++ if isinstance(inner, ast.Name) and inner.id == "str": ++ raise Refused("type:List[str]", "OM-2 has no array-of-strings type") ++ if isinstance(inner, ast.Name) and inner.id == "bool": ++ raise Refused("type:List[bool]", "omc refuses bool arrays (new bool N, error 9)") ++ raise Refused("type:List[compound]", text) ++ if head in ("Tuple", "tuple"): ++ elts = ann.slice.elts if isinstance(ann.slice, ast.Tuple) else [ann.slice] ++ names = [e.id if isinstance(e, ast.Name) else None for e in elts] ++ if len(set(names)) == 1 and names[0] in SEQ_ELEMS: ++ return Seq(SEQ_ELEMS[names[0]], "tuple", fixed=len(elts)) ++ raise Refused("type:Tuple[mixed]", text) ++ raise Refused(f"type:{head}", text) ++ raise Refused("type:other", text) ++ ++ ++def _name_ok(name: str, used: set) -> bool: ++ return ( ++ name not in KEYWORDS ++ # The pinned omc looks a word up in its keyword table by its first eight bytes ++ # only (omc.om `fn kw` takes one packed ulong), so it reads a longer name such as ++ # truncate_number or continue_x as the keyword truncate / continue (error 16). ++ and name[:8] not in KEYWORDS ++ and name not in HARNESS_NAMES ++ and name not in used ++ and not HARNESS_NAME_RE.match(name) ++ ) ++ ++ ++def fit_name(py: str, used: set, limit: int) -> str: ++ """An Omega name for Python identifier `py`: at most `limit` characters, not a ++ keyword (nor starting with an eight-letter one), not a harness name, not used.""" ++ base = py[:limit] ++ if len(base) > 8 and base[:8] in KEYWORDS: ++ base = base[0].upper() + base[1:] ++ if _name_ok(base, used): ++ return base ++ for k in range(1, 100): ++ suffix = "_" if k == 1 else f"_{k}" ++ cand = base[: limit - len(suffix)] + suffix ++ if _name_ok(cand, used): ++ return cand ++ raise Refused("name:unmappable", py) ++ ++ ++def f64_literal(v) -> str: ++ """Exact round-trip OM-2 float literal (digits.digits[e[-]digits]).""" ++ f = float(v) ++ if not math.isfinite(f): ++ raise Refused("value:non-finite float", repr(v)) ++ if isinstance(v, int) and float(f) != v: ++ raise Refused("value:int not exact in f64", repr(v)) ++ r = repr(f) ++ if "e" in r: ++ mant, exp = r.split("e") ++ if "." not in mant: ++ mant += ".0" ++ return f"{mant}e{int(exp)}" ++ if "." not in r: ++ r += ".0" ++ return r ++ ++ ++class OmExpr(str): ++ """A rendered expression (for doctests and the seen_tests table) that keeps ++ its structure in `.node` for test generation.""" ++ ++ def __new__(cls, text: str, node): ++ s = super().__new__(cls, text) ++ s.node = node ++ return s ++ ++ ++def _render(node) -> str: ++ kind = node[0] ++ if kind == "lit": ++ v = node[1] ++ if isinstance(v, bool): ++ return "true" if v else "false" ++ if isinstance(v, float): ++ return repr(v) ++ if isinstance(v, str): ++ return '"' + v.replace("\\", "\\\\").replace('"', '\\"').replace("\n", "\\n").replace("\t", "\\t") + '"' ++ if v is None: ++ return "none" ++ return str(v) ++ if kind == "var": ++ return node[1] ++ if kind in ("list", "tuple", "set"): ++ o, c = {"list": "[]", "tuple": "()", "set": "{}"}[kind] ++ return o + ", ".join(_render(e) for e in node[1]) + c ++ if kind == "dict": ++ return "{" + ", ".join(f"{_render(k)}: {_render(v)}" for k, v in zip(node[1], node[2])) + "}" ++ if kind == "call": ++ parts = [_render(node[1])] + [_render(a) for a in node[2]] ++ return " ".join(parts) ++ raise ValueError(node) ++ ++ ++_TEXT_SAFE = re.compile(rb"[\x20-\x7e\n\t]*\Z") ++ ++ ++def _text_literal(b: bytes) -> Optional[str]: ++ """An OM-2 `text` literal for bytes b, or None when b needs an escape omc lacks.""" ++ if not _TEXT_SAFE.match(b): ++ return None ++ s = b.decode("ascii") ++ return '"' + s.replace("\\", "\\\\").replace('"', '\\"').replace("\n", "\\n").replace("\t", "\\t") + '"' ++ ++ ++class Translator: ++ stop = ["\nfn ", "\nstruct ", "\nglobal ", "\ntext ", "\nconst ", "\nlayout ", "\nabstract "] ++ ++ def __init__(self): ++ self.refusal: Optional[Refused] = None ++ self.params = [] # [(py_name, om_name, type)] ++ self.ret = None ++ self.fn = None ++ self.py_fn = None ++ self.res = None ++ self.cases = [] ++ ++ def file_ext(self): ++ return "om" ++ ++ def no_completion_prompt_stub(self): ++ return "trap 14\nend\n" ++ ++ # ---- prompt --------------------------------------------------------------- ++ ++ def translate_prompt(self, name: str, args: List[ast.arg], returns, description: str) -> Optional[str]: ++ self.refusal = None ++ try: ++ return self._prompt(name, args, returns, description) ++ except Refused as e: ++ self.refusal = e ++ return None ++ ++ def _prompt(self, name, args, returns, description): ++ self.py_fn = name ++ self.fn = fit_name(name, set(), MAX_FN) ++ used = {self.fn} ++ self.params = [] ++ for a in args: ++ t = om_type(a.annotation) ++ om = fit_name(a.arg, used, MAX_LOCAL) ++ used.add(om) ++ self.params.append((a.arg, om, t)) ++ self.ret = om_type(returns) ++ self.res = None ++ if isinstance(self.ret, Seq): ++ self.res = "res" # HARNESS_NAMES keeps parameters off this name ++ slots = sum(t.slots for _, _, t in self.params) + (2 if self.res else 0) ++ if slots > MAX_SLOTS: ++ raise Refused("abi:parameter slots", f"{slots} > {MAX_SLOTS}") ++ ++ lines = ["om2"] ++ for line in description.strip().split("\n"): ++ lines.append(("note " + line).rstrip()) ++ renamed = [(py, om) for py, om, _ in self.params if py != om] ++ if self.fn != name: ++ renamed.insert(0, (name, self.fn)) ++ for py, om in renamed: ++ lines.append(f"note Omega name: {py} is {om} here.") ++ if self.res: ++ what = {"str": "bytes", "list": "elements", "tuple": "elements"}[self.ret.py] ++ lines.append( ++ f"note Result: write the {what} into res (len res >= {RESULT_CAP}) and return how many were written." ++ ) ++ sig = [self.fn] ++ for _, om, t in self.params: ++ sig.append(f"{om} {t.om}" if isinstance(t, Scalar) else f"{om} view {t.elem} *") ++ if self.res: ++ sig.append(f"res edit {self.ret.elem} *") ++ rt = "long" if self.res else self.ret.om ++ lines.append("fn " + " ".join(sig) + f" to {rt}") ++ return "\n".join(lines) + "\n" ++ ++ # ---- values --------------------------------------------------------------- ++ ++ def gen_literal(self, c): ++ return ("lit", c) ++ ++ def gen_var(self, v): ++ if v == "candidate" or v == self.py_fn: ++ return ("var", self.fn or v) ++ return ("var", v) ++ ++ def gen_list(self, l): ++ return ("list", l) ++ ++ def gen_tuple(self, t): ++ return ("tuple", t) ++ ++ def gen_dict(self, keys, values): ++ return ("dict", keys, values) ++ ++ def gen_set(self, s): ++ return ("set", s) ++ ++ def gen_call(self, func, args): ++ return ("call", func, args) ++ ++ def finalize(self, expr, context): ++ return OmExpr(_render(expr), expr) ++ ++ # ---- tests ---------------------------------------------------------------- ++ ++ def test_suite_prefix_lines(self, entry_point): ++ self.cases = [] ++ return [] ++ ++ def test_suite_suffix_lines(self): ++ lines = [f'text mpe_ok "{MPE_OK_LINE}\\n"', "fn main to int"] ++ for k in range(len(self.cases)): ++ lines += [f"if not tc_{k}", f"ret {k + 1}", "end"] ++ lines += ["w = write 1 mpe_ok 0 len mpe_ok", "ret 0", "end"] ++ return lines ++ ++ def _scalar(self, node, t: Scalar, rhs: bool) -> str: ++ if node[0] != "lit": ++ raise Refused("value:non-literal", _render(node)) ++ v = node[1] ++ if t.om == "bool": ++ if isinstance(v, bool): ++ return "true" if v else "false" ++ if rhs and isinstance(v, int) and v in (0, 1): ++ return "true" if v else "false" ++ raise Refused("value:not a bool", repr(v)) ++ if t.om == "long": ++ if isinstance(v, bool): ++ return "1" if v else "0" ++ if isinstance(v, float) and v.is_integer(): ++ v = int(v) ++ if not isinstance(v, int): ++ raise Refused("value:not an int", repr(v)) ++ if not I64_MIN <= v <= I64_MAX: ++ raise Refused("value:int outside i64", repr(v)) ++ return str(v) ++ if isinstance(v, bool) or not isinstance(v, (int, float)): ++ raise Refused("value:not a float", repr(v)) ++ return f64_literal(v) ++ ++ def _elements(self, node, t: Seq, rhs: bool) -> List[str]: ++ if t.py == "str": ++ if node[0] != "lit" or not isinstance(node[1], str): ++ raise Refused("value:not a str", _render(node)) ++ if not node[1].isascii(): ++ raise Refused("value:non-ASCII string", "Omega strings are bytes, Python str is code points") ++ return [str(b) for b in node[1].encode("ascii")] ++ if node[0] not in ("list", "tuple"): ++ raise Refused("value:not a sequence", _render(node)) ++ if t.fixed is not None and len(node[1]) != t.fixed: ++ raise Refused("value:tuple arity", _render(node)) ++ return [self._scalar(e, Scalar(t.elem), rhs) for e in node[1]] ++ ++ def deep_equality(self, left, right): ++ try: ++ return self._case(left.node, right.node) ++ except Refused as e: ++ self.refusal = e ++ raise ++ ++ def _case(self, call, expect): ++ if call[0] != "call" or call[1] != ("var", self.fn): ++ raise Refused("tests:not a direct candidate call", _render(call)) ++ if len(call[2]) != len(self.params): ++ raise Refused("tests:arity", _render(call)) ++ k = len(self.cases) ++ if k >= MAX_CASES: ++ raise Refused("tests:too many cases", f"> {MAX_CASES}") ++ texts, body, argv = [], [], [] ++ for j, (node, (_, _, t)) in enumerate(zip(call[2], self.params)): ++ if isinstance(t, Scalar): ++ argv.append(self._scalar(node, t, rhs=False)) ++ continue ++ elems = self._elements(node, t, rhs=False) ++ # An empty string goes through `part a 0 0`, never `text t ""`: the pinned omc ++ # takes a zero-length name as an unsized parameter (omc.om arrarg, nm_len 0) ++ # and passes a stale register as the count, so `len` is garbage in the callee. ++ if t.py == "str" and elems: ++ lit = _text_literal(node[1].encode("ascii")) ++ if lit is not None: ++ texts.append(f"text t{k}_{j} {lit}") ++ argv.append(f"t{k}_{j}") ++ continue ++ zero = "0.0" if t.elem == "f64" else "0" ++ body.append(f"a{j} = new {t.elem} {max(1, len(elems))} {zero}") ++ body += [f"put a{j} {i} {v}" for i, v in enumerate(elems)] ++ argv.append(f"a{j}" if elems else f"part a{j} 0 0") ++ if self.res: ++ zero = "0.0" if self.ret.elem == "f64" else "0" ++ exp = self._elements(expect, self.ret, rhs=True) ++ body.append(f"res = new {self.ret.elem} {max(RESULT_CAP, len(exp))} {zero}") ++ argv.append("res") ++ body.append(f"r = {self.fn} {' '.join(argv)}".rstrip()) ++ body += [f"if ne r {len(exp)}", "ret false", "end"] ++ for i, v in enumerate(exp): ++ body += [f"if ne get res {i} {v}", "ret false", "end"] ++ body.append("ret true") ++ else: ++ exp = self._scalar(expect, self.ret, rhs=True) ++ body.append(f"r = {self.fn} {' '.join(argv)}".rstrip()) ++ body.append(f"ret eq r {exp}") ++ self.cases.append(k) ++ return "\n".join(texts + [f"fn tc_{k} to bool"] + body + ["end"]) +diff --git a/dataset_builder/terms.csv b/dataset_builder/terms.csv +index 8b089d4..741f870 100644 +--- a/dataset_builder/terms.csv ++++ b/dataset_builder/terms.csv +@@ -26,3 +26,4 @@ Matlab,m,array,array,array,dictionary,,true,false + Haskell,hs,list,list,tuple,association list,Nothing,True,False + Clojure,clj,vector,list,vector,map,nil,true,false + Dart,dart,list,list,record,map,null,true,false ++Omega,om,array,array,array,dictionary,none,true,false +diff --git a/evaluation/src/containerized_eval.py b/evaluation/src/containerized_eval.py +index 533fb68..1401c2a 100644 +--- a/evaluation/src/containerized_eval.py ++++ b/evaluation/src/containerized_eval.py +@@ -29,6 +29,7 @@ import eval_clj + import eval_v + import eval_lean + import eval_dart ++import eval_om + import tempfile + + +@@ -65,6 +66,7 @@ EVALUATORS = { + "coq": (eval_v.eval_script, ".v"), + "lean": (eval_lean.eval_script, ".lean"), + "dart": (eval_dart.eval_script, ".dart"), ++ "om": (eval_om.eval_script, ".om"), + } + + def eval_string_script(language, program): +diff --git a/evaluation/src/eval_om.py b/evaluation/src/eval_om.py +new file mode 100755 +index 0000000..0645893 +--- /dev/null ++++ b/evaluation/src/eval_om.py +@@ -0,0 +1,143 @@ ++#!/usr/bin/env python3 ++# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ++"""MultiPL-E evaluator for Omega programs written by humaneval_to_om.py. ++ ++Foreign-harness adapter: MultiPL-E calls ``eval_script(path)`` from ++``evaluation/src/eval_.py``, so this file is Python. It is not first-party ++Omega and is not part of any Omega product path. Pure standard library. ++ ++ OMEGA_OMC=/path/to/omc eval_om.py PROGRAM.om [...] # one JSON result per line ++ ++Compile protocol (pinned omc): ``omc < p.om > p 2> p.err``. Only when omc exits ++0 with nothing on stderr is ``p`` made executable and run. The omc file must hash ++to OMEGA_OMC_SHA256 (default: the omega-rosetta pin); a mismatch raises before ++anything is compiled, so no result is ever recorded against an unpinned compiler. ++ ++Outcome -> MultiPL-E ``status`` (``om_status``, ``om_case``): ++ ++ omc nonzero / stderr SyntaxError compile_error omc error code ++ exit 0 + pass line OK pass - ++ exit 0 without pass line Exception no_pass_line - ++ exit 1..98 Exception wrong_answer failing test case (exit - 1) ++ exit 100..199 Exception trap trap code (exit - 100) ++ other exit / signal Exception exit_other exit code ++ over the time limit Timeout timeout - ++ ++MultiPL-E's containerized_eval keeps only status/exit_code/stdout/stderr; the ++om_* fields are derivable from exit_code by the table above. ++""" ++ ++import hashlib ++import json ++import os ++import re ++import shlex ++import signal ++import subprocess ++import sys ++import tempfile ++from pathlib import Path ++ ++# Pin of aien-dev/omega-rosetta omega.ref (omega-mv e5b32567a7aff3ce594e3254a622a846a6cd190b). ++PINNED_OMC_SHA256 = "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f" ++# Must equal humaneval_to_om.MPE_OK_LINE: the line main writes after the last case holds. ++MPE_OK_LINE = "MultiPL-E Omega: all tests passed" ++COMPILE_TIMEOUT = 30 ++MAX_OUTPUT = 2048 ++_ERROR_RE = re.compile(r"omc: line (\d+): error (\d+)") ++_checked = {} ++ ++ ++def omc_path(omc=None) -> str: ++ omc = omc or os.environ.get("OMEGA_OMC") ++ if not omc: ++ raise RuntimeError("eval_om: set OMEGA_OMC to the pinned omc binary") ++ return omc ++ ++ ++def check_pin(omc: str) -> None: ++ """Raise unless the omc file hashes to the pin. Cached by (path, size, mtime).""" ++ st = os.stat(omc) ++ key = (os.path.realpath(omc), st.st_size, st.st_mtime_ns) ++ want = os.environ.get("OMEGA_OMC_SHA256", PINNED_OMC_SHA256) ++ if _checked.get(key) == want: ++ return ++ h = hashlib.sha256() ++ with open(omc, "rb") as f: ++ for chunk in iter(lambda: f.read(1 << 20), b""): ++ h.update(chunk) ++ got = h.hexdigest() ++ if got != want: ++ raise RuntimeError(f"eval_om: {omc} has sha256 {got}, pin is {want}; refusing to evaluate") ++ _checked[key] = want ++ ++ ++def _wrap() -> list: ++ """Optional command prefix for omc and the program, e.g. 'nice -n 19 taskset -c 10-14'.""" ++ return shlex.split(os.environ.get("OMEGA_EVAL_WRAP", "")) ++ ++ ++def _run(argv, timeout, stdin=None, stdout=subprocess.PIPE): ++ """Run argv in its own process group; kill the group on timeout. ++ Returns (exit_code or None on timeout, stdout bytes, stderr bytes).""" ++ p = subprocess.Popen( ++ argv, stdin=stdin or subprocess.DEVNULL, stdout=stdout, stderr=subprocess.PIPE, start_new_session=True ++ ) ++ try: ++ out, err = p.communicate(timeout=timeout) ++ return p.returncode, out or b"", err or b"" ++ except subprocess.TimeoutExpired: ++ os.killpg(p.pid, signal.SIGKILL) ++ out, err = p.communicate() ++ return None, out or b"", err or b"" ++ ++ ++def _text(b: bytes) -> str: ++ return b[:MAX_OUTPUT].decode("utf-8", errors="replace") ++ ++ ++def eval_script(path: Path, omc=None, timeout=None) -> dict: ++ omc = omc_path(omc) ++ check_pin(omc) ++ if timeout is None: ++ timeout = float(os.environ.get("OMEGA_EVAL_TIMEOUT", "15")) ++ with tempfile.TemporaryDirectory(prefix="eval_om.") as d: ++ exe = os.path.join(d, "p") ++ with open(path, "rb") as src, open(exe, "wb") as dst: ++ rc, _, err = _run(_wrap() + [omc], COMPILE_TIMEOUT, stdin=src, stdout=dst) ++ if rc is None: ++ return {"status": "Timeout", "exit_code": -1, "stdout": "", "stderr": "omc timeout", ++ "om_status": "timeout", "om_case": None} ++ if rc != 0 or err: ++ m = _ERROR_RE.search(err.decode("utf-8", errors="replace")) ++ return {"status": "SyntaxError", "exit_code": rc, "stdout": "", "stderr": _text(err), ++ "om_status": "compile_error", "om_case": int(m.group(2)) if m else None} ++ os.chmod(exe, 0o700) ++ rc, out, err = _run(_wrap() + [exe], timeout) ++ result = {"exit_code": rc if rc is not None else -1, "stdout": _text(out), "stderr": _text(err)} ++ if rc is None: ++ result.update(status="Timeout", om_status="timeout", om_case=None) ++ elif rc == 0 and out.endswith((MPE_OK_LINE + "\n").encode()): ++ result.update(status="OK", om_status="pass", om_case=None) ++ elif rc == 0: ++ result.update(status="Exception", om_status="no_pass_line", om_case=None) ++ elif 1 <= rc <= 98: ++ result.update(status="Exception", om_status="wrong_answer", om_case=rc - 1) ++ elif 100 <= rc <= 199: ++ result.update(status="Exception", om_status="trap", om_case=rc - 100) ++ else: ++ result.update(status="Exception", om_status="exit_other", om_case=rc) ++ return result ++ ++ ++def main(argv): ++ if not argv or argv[0] in ("-h", "--help"): ++ print(__doc__) ++ return 0 if argv else 2 ++ for p in argv: ++ print(json.dumps({"path": p, **eval_script(Path(p))})) ++ return 0 ++ ++ ++if __name__ == "__main__": ++ sys.exit(main(sys.argv[1:])) +diff --git a/evaluation/test_inputs/om-hand-0.0-keep-HumanEval53.json b/evaluation/test_inputs/om-hand-0.0-keep-HumanEval53.json +new file mode 100644 +index 0000000..1e3d77f +--- /dev/null ++++ b/evaluation/test_inputs/om-hand-0.0-keep-HumanEval53.json +@@ -0,0 +1,19 @@ ++{ ++ "name": "HumanEval_53_add", ++ "language": "om", ++ "prompt": "om2\nnote Add two numbers x and y\nnote >>> add_ 2 3\nnote 5\nnote >>> add_ 5 7\nnote 12\nnote Omega name: add is add_ here.\nfn add_ x long y long to long\n", ++ "tests": "fn tc_0 to bool\nr = add_ 0 1\nret eq r 1\nend\nfn tc_1 to bool\nr = add_ 1 0\nret eq r 1\nend\nfn tc_2 to bool\nr = add_ 2 3\nret eq r 5\nend\nfn tc_3 to bool\nr = add_ 5 7\nret eq r 12\nend\nfn tc_4 to bool\nr = add_ 7 5\nret eq r 12\nend\ntext mpe_ok \"MultiPL-E Omega: all tests passed\\n\"\nfn main to int\nif not tc_0\nret 1\nend\nif not tc_1\nret 2\nend\nif not tc_2\nret 3\nend\nif not tc_3\nret 4\nend\nif not tc_4\nret 5\nend\nw = write 1 mpe_ok 0 len mpe_ok\nret 0\nend", ++ "completions": [ ++ "ret add x y\nend\n", ++ "ret add x\nend\n" ++ ], ++ "stop_tokens": [ ++ "\nfn ", ++ "\nstruct ", ++ "\nglobal ", ++ "\ntext ", ++ "\nconst ", ++ "\nlayout ", ++ "\nabstract " ++ ] ++} +-- +2.43.0 + diff --git a/bench/upstream/PR.md b/bench/upstream/PR.md new file mode 100644 index 0000000..842cc2a --- /dev/null +++ b/bench/upstream/PR.md @@ -0,0 +1,143 @@ +# Upstream package for nuprl/MultiPL-E (PUBLISH-QUEUE, not submitted) + +This is not sent. Submitting it posts outside aien-dev and needs Drake's OK for +this one item. + +- Target: `nuprl/MultiPL-E`, branch `main`, based on + `3025a531af7450e7df8b96fe0440e9804480bbad`. +- Patch: `0001-Add-Omega-OM-2-translator-and-evaluator.patch`. Apply it with + `git am` or `git apply`. It adds 610 lines in 5 files and deletes none. +- `dataset_builder/terms.csv` uses CRLF line endings. The patch keeps them, and + `bench/.gitattributes` stops git from rewriting the patch file. + +How it was checked (2026-10-27, Linux AArch64): + +1. `git apply --check` succeeded on a fresh clone at the base commit, and the patch + then applied. +2. MultiPL-E's own `dataset_builder/prepare_prompts_for_hfhub.py` ran in the patched + tree with `--lang humaneval_to_om.py --doctests transform --prompt-terminology + reworded`. HumanEval gave 129 problems and `mbpp-typed` gave 272. Their `prompt`, + `tests`, `stop_tokens` and `language` fields equal `bench/prompts/*.jsonl` for + every problem. The script imports `datasets`, so this check ran in a throwaway + venv with `datasets` 5.1.0. +3. In the patched `evaluation/src`, `containerized_eval.eval_string_script("om", …)` + ran on the two completions in `evaluation/test_inputs/om-hand-0.0-keep-HumanEval53.json` + with `OMEGA_OMC` set. The results were `OK` (exit 0) and `SyntaxError` (omc error 4), + which is the "first OK, second fails" shape the other `test_inputs` use. + +NOT_RUN: + +- The MultiPL-E evaluation container. Its Dockerfile is `ubuntu:22.04` with amd64-only + apt sources, and omc writes AArch64 executables. +- Any model. +- `evaluation/src/main.py --testing`, because the host has no `tqdm`. + +--- + +## PR title + +Add Omega (OM-2) as a MultiPL-E language + +## PR body + +This adds [Omega](https://github.com/aien-dev/omega-mv) as a MultiPL-E target +language with file extension `.om`. Omega is a small systems language with its +own compiler, `omc`, which writes static AArch64 Linux executables directly. + +**What is added** + +- `dataset_builder/humaneval_to_om.py` is the `Translator`. Each problem becomes an + OM-2 `fn` signature preceded by `note` lines that carry the docstring. Doctests + are transformed into Omega call syntax. + - Type mapping: `int`→`long`, `float`→`f64`, `bool`→`bool`, + `List[int]`/`List[float]`→`view long *`/`view f64 *`, `str`→`view uchar *`, + and homogeneous numeric tuples→views. + - A list, string or tuple result becomes a trailing `res edit T *` parameter, and + the function returns the element count. + - The tests become one Omega function per assertion plus a `main`. `main` exits + with `K+1` when case K fails. When every case holds, it prints + `MultiPL-E Omega: all tests passed` and exits 0. + - The translator refuses (returns `None`, with a reason) every type or value it + can't express faithfully: `List[str]`, nested lists, mixed tuples, + `Optional`, `Union`, `Dict`, `Set`, `Any`, non-ASCII strings, ints outside + i64, and calls with more than 6 argument slots. + - Coverage at this base commit: HumanEval 129 of the 161 originals (161 of the + 164 problems), MBPP (`mbpp-typed`) 272 of 400. +- `evaluation/src/eval_om.py` compiles with `omc` and runs the program. It uses + only the standard library. + - Compile failure, or any omc diagnostic, is `SyntaxError`. + - A pass is `OK` and requires exit 0 **and** the final pass line. + - A wrong answer or a trap is `Exception`, and a time-out is `Timeout`. + - Each run gets its own process group, which is killed on time-out. +- `terms.csv` gets the row `Omega,om,array,array,array,dictionary,none,true,false`. + Omega has no dictionary or None value, and problems that use them are refused. +- `containerized_eval.py` gets the `"om"` entry. +- `evaluation/test_inputs/om-hand-0.0-keep-HumanEval53.json` holds one passing and + one non-compiling completion. + +**Running it** + +Set `OMEGA_OMC` to an `omc` binary. `eval_om.py` checks its sha256 against +`OMEGA_OMC_SHA256`, which defaults to the pinned build: omega-mv +`e5b32567a7aff3ce594e3254a622a846a6cd190b`, sha256 +`2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`. If the hash +doesn't match, it refuses to evaluate, so results always name one compiler. +`OMEGA_EVAL_TIMEOUT` sets the per-program limit in seconds (default 15). + +omc targets Linux AArch64 only. The current evaluation image is amd64, so this PR +does **not** change the Dockerfile. Two options, neither tried: + +- Build the image for `linux/arm64`. +- Add `qemu-user` to the amd64 image and set `OMEGA_EVAL_WRAP=qemu-aarch64`. + omc is itself an AArch64 executable, and the prefix applies to both omc and the + compiled program. + +An arm64 image could fetch the pinned compiler as follows: + +```dockerfile +RUN git clone https://github.com/aien-dev/omega-mv /omega && \ + git -C /omega checkout e5b32567a7aff3ce594e3254a622a846a6cd190b +ENV OMEGA_OMC=/omega/seed/out/omc +``` + +`seed/omega-from-seed.sh` in that repository can instead rebuild omc from its +408-byte seed. + +**Evidence** + +The adapter's own gate suite is `bench/check.sh` in +[aien-dev/omega-rosetta](https://github.com/aien-dev/omega-rosetta). It compiles +every translated HumanEval and MBPP problem with a stub body. + +| completions | pass@1 | +|---|---| +| 10 hand-written HumanEval solutions | 1.0 | +| constant wrong answers | 0.0 (all `wrong_answer`) | +| invalid syntax | 0.0 (all `SyntaxError`) | +| traps | 0.0 (all `trap`) | +| infinite loops | 0.0 (all `Timeout`) | + +No language model was evaluated for this PR. + +**Licence** + +The contribution is offered under MultiPL-E's licence (BSD 3-Clause with the +Machine Learning Restriction in `LICENSE`). + +--- + +## Wolfram check of the pass@k values + +The `bench/score.py` estimator matches MultiPL-E's `pass_k.estimator`. Its pass@k +values were checked with Wolfram: + +``` +WolframLanguageEvaluator: + est[n_,c_,k_] := If[n - c < k, 1, 1 - Binomial[n - c, k]/Binomial[n, k]]; + {Mean[Table[est[1,1,1],10]], Mean[Table[est[1,0,1],10]], + N[est[20,7,1],17], N[est[20,7,10],17], N[est[200,13,100],17], N[est[5,3,10],17]} +-> {1, 0, 0.35, 0.99845201238390093, 0.99991949719880544, 1.} +``` + +`score.estimator` gave `0.3500000000000001`, `0.9984520123839009`, +`0.9999194971988055` and `1.0` for the last four. They agree to double precision.