commit eb75795ee0d96765a28e49d0f3745dc63c967569 Author: ModelHub XC Date: Sat Nov 14 14:13:43 2026 +0800 初始化项目,由ModelHub XC社区提供模型 Model: jgalego/ada-coder-qwen2.5-7b Source: Original Platform diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..52373fe --- /dev/null +++ b/.gitattributes @@ -0,0 +1,36 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text +tokenizer.json filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md new file mode 100644 index 0000000..ecd06c5 --- /dev/null +++ b/README.md @@ -0,0 +1,101 @@ +--- +base_model: Qwen/Qwen2.5-Coder-7B-Instruct +datasets: +- the-clanker-lover/steelman-sft-ada +- nuprl/MultiPL-E +language: en +library_name: transformers +license: apache-2.0 +pipeline_tag: text-generation +tags: +- ada +- spark +- code +model-index: +- name: ada-coder-qwen2.5-7b + results: + - task: + type: text-generation + dataset: + name: MultiPL-E HumanEval-Ada + type: nuprl/MultiPL-E + config: humaneval-adb + metrics: + - type: pass@1 + value: 0.414 + name: pass@1 + - type: compile_rate + value: 0.771 + name: Compile rate +--- + +# ada-coder-qwen2.5-7b + +

Ada coder logo: a Jacquard punched card, after Ada Lovelace's loom analogy, whose holes form a teal check mark

+ +[Qwen/Qwen2.5-Coder-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct) fine-tuned with LoRA to write Ada 2022 and SPARK code from a task description, spec or signature. + +> [!WARNING] +> **Review every line.** The output is not qualified for DO-178C, EN 50128, ISO 26262 or any other certification process. Compile it, test it and, for SPARK, prove it before use. + +## 🚀 Usage + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer + +repo = "jgalego/ada-coder-qwen2.5-7b" +tokenizer = AutoTokenizer.from_pretrained(repo) +model = AutoModelForCausalLM.from_pretrained(repo, dtype="auto") + +messages = [ + {"role": "system", "content": "You write Ada 2022 and SPARK code that compiles cleanly with GNAT."}, + {"role": "user", "content": "Write a function that returns the greatest common divisor of two Positive numbers."}, +] +inputs = tokenizer.apply_chat_template( + messages, + add_generation_prompt=True, + return_tensors="pt", + return_dict=True, +) +out = model.generate(**inputs, max_new_tokens=512, do_sample=False) +print(tokenizer.decode(out[0, inputs["input_ids"].shape[1] :], skip_special_tokens=True)) +``` + +It also completes raw Ada source with no chat template, which is how it is scored below. + +## 🏋️ Training + +| | | +|---|---| +| Base | [Qwen/Qwen2.5-Coder-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct) | +| Data | `r7_dataset.jsonl` from [the-clanker-lover/steelman-sft-ada](https://huggingface.co/datasets/the-clanker-lover/steelman-sft-ada), 6,110 instruction/code pairs that compile with GNAT | +| Method | LoRA, r=16, alpha=32, all linear layers, merged | +| Steps | 378 (1.0 epochs), batch size 16, max length 2048 | +| Learning rate | 0.0002, cosine | +| Mean train loss | 0.2128 | +| Hardware | NVIDIA A10G, 69 min | + +## 📊 Results + +[nuprl/MultiPL-E](https://huggingface.co/datasets/nuprl/MultiPL-E) HumanEval-Ada (`humaneval-adb`, 157 problems). Greedy decoding from the raw prompt, then built and run with the GNAT flags from MultiPL-E's `eval_adb.py`. A program passes when every `pragma Assert` holds. + +| Model | n | pass@1 | Compile rate | Runtime errors | Timeouts | +|---|---|---|---|---|---| +| jgalego/ada-coder-qwen2.5-7b | 157 | 0.414 | 0.771 | 56 | 0 | +| jgalego/ada-coder-qwen2.5-7b@grpo-1 | 157 | 0.414 | 0.796 | 60 | 0 | +| jgalego/ada-coder-qwen2.5-7b@sft-2 | 157 | 0.401 | 0.771 | 58 | 0 | +| Qwen/Qwen2.5-Coder-7B-Instruct | 157 | 0.312 | 0.471 | 25 | 0 | + +Reference scores reported by the Steelman authors ([model card](https://huggingface.co/the-clanker-lover/steelman-14b-ada), [report](https://huggingface.co/datasets/the-clanker-lover/steelman-sft-ada/blob/main/humaneval_ada/multipl_e_r6v3_report.md)) on the same benchmark with their own harness, temperature 0: + +| Model | pass@1 | Compile rate | +|---|---|---| +| Steelman 14B v0.3 (Qwen2.5-Coder-14B + R7 data) | 0.459 | 0.854 | +| Steelman 14B v0.2 (Qwen2.5-Coder-14B-Instruct + R6 data) | 0.471 | 0.752 | +| Qwen2.5-Coder-14B, untuned | 0.344 | 0.510 | + +## ⚠️ Limitations + +- Scored on small HumanEval-style functions, not on full programs or packages. +- Contracts are at most checked at run time (`-gnata`); nothing here runs GNATprove. +- Trained on a single dataset; style follows that data. \ No newline at end of file diff --git a/assets/logo.svg b/assets/logo.svg new file mode 100644 index 0000000..f821c45 --- /dev/null +++ b/assets/logo.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chat_template.jinja b/chat_template.jinja new file mode 100644 index 0000000..bdf7919 --- /dev/null +++ b/chat_template.jinja @@ -0,0 +1,54 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0]['role'] == 'system' %} + {{- messages[0]['content'] }} + {%- else %} + {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }} + {%- endif %} + {{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0]['role'] == 'system' %} + {{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }} + {%- else %} + {{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- for message in messages %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %} + {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {{- '<|im_start|>' + message.role }} + {%- if message.content %} + {{- '\n' + message.content }} + {%- endif %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {{- tool_call.arguments | tojson }} + {{- '}\n' }} + {%- endfor %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- message.content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} +{%- endif %} diff --git a/config.json b/config.json new file mode 100644 index 0000000..5530eeb --- /dev/null +++ b/config.json @@ -0,0 +1,61 @@ +{ + "architectures": [ + "Qwen2ForCausalLM" + ], + "attention_dropout": 0.0, + "bos_token_id": 151643, + "dtype": "bfloat16", + "eos_token_id": 151645, + "hidden_act": "silu", + "hidden_size": 3584, + "initializer_range": 0.02, + "intermediate_size": 18944, + "layer_types": [ + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention" + ], + "max_position_embeddings": 32768, + "max_window_layers": 28, + "model_type": "qwen2", + "num_attention_heads": 28, + "num_hidden_layers": 28, + "num_key_value_heads": 4, + "pad_token_id": 151643, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "rope_theta": 1000000.0, + "rope_type": "default" + }, + "sliding_window": null, + "tie_word_embeddings": false, + "transformers_version": "5.18.0", + "use_cache": false, + "use_sliding_window": false, + "vocab_size": 152064 +} diff --git a/generation_config.json b/generation_config.json new file mode 100644 index 0000000..3fe2e86 --- /dev/null +++ b/generation_config.json @@ -0,0 +1,14 @@ +{ + "bos_token_id": 151643, + "do_sample": true, + "eos_token_id": [ + 151645, + 151643 + ], + "pad_token_id": 151643, + "repetition_penalty": 1.1, + "temperature": 0.7, + "top_k": 20, + "top_p": 0.8, + "transformers_version": "5.18.0" +} diff --git a/model-00001-of-00009.safetensors b/model-00001-of-00009.safetensors new file mode 100644 index 0000000..eb75c02 --- /dev/null +++ b/model-00001-of-00009.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5aa6e5cbe642377fd441fb4e60e83cca96b2bcd9820e245b9ea06d94653f17f2 +size 1089994880 diff --git a/model-00002-of-00009.safetensors b/model-00002-of-00009.safetensors new file mode 100644 index 0000000..102f838 --- /dev/null +++ b/model-00002-of-00009.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:153f1e1d6ca12ebfdfd6cbd20479894745d330a56e3bc62a95f0c3170c568f78 +size 1992867304 diff --git a/model-00003-of-00009.safetensors b/model-00003-of-00009.safetensors new file mode 100644 index 0000000..efdf9a7 --- /dev/null +++ b/model-00003-of-00009.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1380a45eb0ef4dfa0e42ea86c25077f681c2b9a1a314466fbaf931e170823bc2 +size 1893836552 diff --git a/model-00004-of-00009.safetensors b/model-00004-of-00009.safetensors new file mode 100644 index 0000000..ef0dbad --- /dev/null +++ b/model-00004-of-00009.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8708964a97a2f8da38f2c4812b6b6913020fc571e184f88e1ce754ca8e365b4 +size 1864467784 diff --git a/model-00005-of-00009.safetensors b/model-00005-of-00009.safetensors new file mode 100644 index 0000000..8bc30aa --- /dev/null +++ b/model-00005-of-00009.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6473cb8ea8f56e4c23e0f7b7e3a561af384e860bd10e950d8f519d11aca7a835 +size 1864467840 diff --git a/model-00006-of-00009.safetensors b/model-00006-of-00009.safetensors new file mode 100644 index 0000000..3f0f1f8 --- /dev/null +++ b/model-00006-of-00009.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e5e8a95dcb74759aafc7831bca68f6612ad277be95410ccd66b672b2cd19efb +size 1864467840 diff --git a/model-00007-of-00009.safetensors b/model-00007-of-00009.safetensors new file mode 100644 index 0000000..d7b59cf --- /dev/null +++ b/model-00007-of-00009.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c15cbf44b183324445e8bc1bc40f31fda6e51427d534ccf096c60a5f156afc27 +size 1864467840 diff --git a/model-00008-of-00009.safetensors b/model-00008-of-00009.safetensors new file mode 100644 index 0000000..5b2b7a9 --- /dev/null +++ b/model-00008-of-00009.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea886aab08add7e3c73de0bd09782f027a471eae979e589fcfcb32089b57ec9f +size 1864467840 diff --git a/model-00009-of-00009.safetensors b/model-00009-of-00009.safetensors new file mode 100644 index 0000000..69e18e9 --- /dev/null +++ b/model-00009-of-00009.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9406970b4886e280d825f1fcfe39b708f8441d65a4f39ab52db350348e054514 +size 932233896 diff --git a/model.safetensors.index.json b/model.safetensors.index.json new file mode 100644 index 0000000..4f1f7ad --- /dev/null +++ b/model.safetensors.index.json @@ -0,0 +1,347 @@ +{ + "metadata": { + "total_parameters": 7615616512, + "total_size": 15231233024 + }, + "weight_map": { + "lm_head.weight": "model-00001-of-00009.safetensors", + "model.embed_tokens.weight": "model-00002-of-00009.safetensors", + "model.layers.0.input_layernorm.weight": "model-00002-of-00009.safetensors", + "model.layers.0.mlp.down_proj.weight": "model-00002-of-00009.safetensors", + "model.layers.0.mlp.gate_proj.weight": "model-00002-of-00009.safetensors", + "model.layers.0.mlp.up_proj.weight": "model-00002-of-00009.safetensors", + "model.layers.0.post_attention_layernorm.weight": "model-00002-of-00009.safetensors", + "model.layers.0.self_attn.k_proj.bias": "model-00002-of-00009.safetensors", + "model.layers.0.self_attn.k_proj.weight": "model-00002-of-00009.safetensors", + "model.layers.0.self_attn.o_proj.weight": "model-00002-of-00009.safetensors", + "model.layers.0.self_attn.q_proj.bias": "model-00002-of-00009.safetensors", + "model.layers.0.self_attn.q_proj.weight": "model-00002-of-00009.safetensors", + "model.layers.0.self_attn.v_proj.bias": "model-00002-of-00009.safetensors", + "model.layers.0.self_attn.v_proj.weight": "model-00002-of-00009.safetensors", + "model.layers.1.input_layernorm.weight": "model-00002-of-00009.safetensors", + "model.layers.1.mlp.down_proj.weight": "model-00002-of-00009.safetensors", + "model.layers.1.mlp.gate_proj.weight": "model-00002-of-00009.safetensors", + "model.layers.1.mlp.up_proj.weight": "model-00002-of-00009.safetensors", + "model.layers.1.post_attention_layernorm.weight": "model-00002-of-00009.safetensors", + "model.layers.1.self_attn.k_proj.bias": "model-00002-of-00009.safetensors", + "model.layers.1.self_attn.k_proj.weight": "model-00002-of-00009.safetensors", + "model.layers.1.self_attn.o_proj.weight": "model-00002-of-00009.safetensors", + "model.layers.1.self_attn.q_proj.bias": "model-00002-of-00009.safetensors", + "model.layers.1.self_attn.q_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.1.self_attn.v_proj.bias": "model-00003-of-00009.safetensors", + "model.layers.1.self_attn.v_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.10.input_layernorm.weight": "model-00004-of-00009.safetensors", + "model.layers.10.mlp.down_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.10.mlp.gate_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.10.mlp.up_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.10.post_attention_layernorm.weight": "model-00005-of-00009.safetensors", + "model.layers.10.self_attn.k_proj.bias": "model-00005-of-00009.safetensors", + "model.layers.10.self_attn.k_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.10.self_attn.o_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.10.self_attn.q_proj.bias": "model-00005-of-00009.safetensors", + "model.layers.10.self_attn.q_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.10.self_attn.v_proj.bias": "model-00005-of-00009.safetensors", + "model.layers.10.self_attn.v_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.11.input_layernorm.weight": "model-00005-of-00009.safetensors", + "model.layers.11.mlp.down_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.11.mlp.gate_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.11.mlp.up_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.11.post_attention_layernorm.weight": "model-00005-of-00009.safetensors", + "model.layers.11.self_attn.k_proj.bias": "model-00005-of-00009.safetensors", + "model.layers.11.self_attn.k_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.11.self_attn.o_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.11.self_attn.q_proj.bias": "model-00005-of-00009.safetensors", + "model.layers.11.self_attn.q_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.11.self_attn.v_proj.bias": "model-00005-of-00009.safetensors", + "model.layers.11.self_attn.v_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.12.input_layernorm.weight": "model-00005-of-00009.safetensors", + "model.layers.12.mlp.down_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.12.mlp.gate_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.12.mlp.up_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.12.post_attention_layernorm.weight": "model-00005-of-00009.safetensors", + "model.layers.12.self_attn.k_proj.bias": "model-00005-of-00009.safetensors", + "model.layers.12.self_attn.k_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.12.self_attn.o_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.12.self_attn.q_proj.bias": "model-00005-of-00009.safetensors", + "model.layers.12.self_attn.q_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.12.self_attn.v_proj.bias": "model-00005-of-00009.safetensors", + "model.layers.12.self_attn.v_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.13.input_layernorm.weight": "model-00005-of-00009.safetensors", + "model.layers.13.mlp.down_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.13.mlp.gate_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.13.mlp.up_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.13.post_attention_layernorm.weight": "model-00005-of-00009.safetensors", + "model.layers.13.self_attn.k_proj.bias": "model-00005-of-00009.safetensors", + "model.layers.13.self_attn.k_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.13.self_attn.o_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.13.self_attn.q_proj.bias": "model-00005-of-00009.safetensors", + "model.layers.13.self_attn.q_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.13.self_attn.v_proj.bias": "model-00005-of-00009.safetensors", + "model.layers.13.self_attn.v_proj.weight": "model-00005-of-00009.safetensors", + "model.layers.14.input_layernorm.weight": "model-00005-of-00009.safetensors", + "model.layers.14.mlp.down_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.14.mlp.gate_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.14.mlp.up_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.14.post_attention_layernorm.weight": "model-00006-of-00009.safetensors", + "model.layers.14.self_attn.k_proj.bias": "model-00006-of-00009.safetensors", + "model.layers.14.self_attn.k_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.14.self_attn.o_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.14.self_attn.q_proj.bias": "model-00006-of-00009.safetensors", + "model.layers.14.self_attn.q_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.14.self_attn.v_proj.bias": "model-00006-of-00009.safetensors", + "model.layers.14.self_attn.v_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.15.input_layernorm.weight": "model-00006-of-00009.safetensors", + "model.layers.15.mlp.down_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.15.mlp.gate_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.15.mlp.up_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.15.post_attention_layernorm.weight": "model-00006-of-00009.safetensors", + "model.layers.15.self_attn.k_proj.bias": "model-00006-of-00009.safetensors", + "model.layers.15.self_attn.k_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.15.self_attn.o_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.15.self_attn.q_proj.bias": "model-00006-of-00009.safetensors", + "model.layers.15.self_attn.q_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.15.self_attn.v_proj.bias": "model-00006-of-00009.safetensors", + "model.layers.15.self_attn.v_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.16.input_layernorm.weight": "model-00006-of-00009.safetensors", + "model.layers.16.mlp.down_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.16.mlp.gate_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.16.mlp.up_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.16.post_attention_layernorm.weight": "model-00006-of-00009.safetensors", + "model.layers.16.self_attn.k_proj.bias": "model-00006-of-00009.safetensors", + "model.layers.16.self_attn.k_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.16.self_attn.o_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.16.self_attn.q_proj.bias": "model-00006-of-00009.safetensors", + "model.layers.16.self_attn.q_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.16.self_attn.v_proj.bias": "model-00006-of-00009.safetensors", + "model.layers.16.self_attn.v_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.17.input_layernorm.weight": "model-00006-of-00009.safetensors", + "model.layers.17.mlp.down_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.17.mlp.gate_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.17.mlp.up_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.17.post_attention_layernorm.weight": "model-00006-of-00009.safetensors", + "model.layers.17.self_attn.k_proj.bias": "model-00006-of-00009.safetensors", + "model.layers.17.self_attn.k_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.17.self_attn.o_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.17.self_attn.q_proj.bias": "model-00006-of-00009.safetensors", + "model.layers.17.self_attn.q_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.17.self_attn.v_proj.bias": "model-00006-of-00009.safetensors", + "model.layers.17.self_attn.v_proj.weight": "model-00006-of-00009.safetensors", + "model.layers.18.input_layernorm.weight": "model-00006-of-00009.safetensors", + "model.layers.18.mlp.down_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.18.mlp.gate_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.18.mlp.up_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.18.post_attention_layernorm.weight": "model-00007-of-00009.safetensors", + "model.layers.18.self_attn.k_proj.bias": "model-00007-of-00009.safetensors", + "model.layers.18.self_attn.k_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.18.self_attn.o_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.18.self_attn.q_proj.bias": "model-00007-of-00009.safetensors", + "model.layers.18.self_attn.q_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.18.self_attn.v_proj.bias": "model-00007-of-00009.safetensors", + "model.layers.18.self_attn.v_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.19.input_layernorm.weight": "model-00007-of-00009.safetensors", + "model.layers.19.mlp.down_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.19.mlp.gate_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.19.mlp.up_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.19.post_attention_layernorm.weight": "model-00007-of-00009.safetensors", + "model.layers.19.self_attn.k_proj.bias": "model-00007-of-00009.safetensors", + "model.layers.19.self_attn.k_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.19.self_attn.o_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.19.self_attn.q_proj.bias": "model-00007-of-00009.safetensors", + "model.layers.19.self_attn.q_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.19.self_attn.v_proj.bias": "model-00007-of-00009.safetensors", + "model.layers.19.self_attn.v_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.2.input_layernorm.weight": "model-00003-of-00009.safetensors", + "model.layers.2.mlp.down_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.2.mlp.gate_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.2.mlp.up_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.2.post_attention_layernorm.weight": "model-00003-of-00009.safetensors", + "model.layers.2.self_attn.k_proj.bias": "model-00003-of-00009.safetensors", + "model.layers.2.self_attn.k_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.2.self_attn.o_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.2.self_attn.q_proj.bias": "model-00003-of-00009.safetensors", + "model.layers.2.self_attn.q_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.2.self_attn.v_proj.bias": "model-00003-of-00009.safetensors", + "model.layers.2.self_attn.v_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.20.input_layernorm.weight": "model-00007-of-00009.safetensors", + "model.layers.20.mlp.down_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.20.mlp.gate_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.20.mlp.up_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.20.post_attention_layernorm.weight": "model-00007-of-00009.safetensors", + "model.layers.20.self_attn.k_proj.bias": "model-00007-of-00009.safetensors", + "model.layers.20.self_attn.k_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.20.self_attn.o_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.20.self_attn.q_proj.bias": "model-00007-of-00009.safetensors", + "model.layers.20.self_attn.q_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.20.self_attn.v_proj.bias": "model-00007-of-00009.safetensors", + "model.layers.20.self_attn.v_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.21.input_layernorm.weight": "model-00007-of-00009.safetensors", + "model.layers.21.mlp.down_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.21.mlp.gate_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.21.mlp.up_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.21.post_attention_layernorm.weight": "model-00007-of-00009.safetensors", + "model.layers.21.self_attn.k_proj.bias": "model-00007-of-00009.safetensors", + "model.layers.21.self_attn.k_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.21.self_attn.o_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.21.self_attn.q_proj.bias": "model-00007-of-00009.safetensors", + "model.layers.21.self_attn.q_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.21.self_attn.v_proj.bias": "model-00007-of-00009.safetensors", + "model.layers.21.self_attn.v_proj.weight": "model-00007-of-00009.safetensors", + "model.layers.22.input_layernorm.weight": "model-00007-of-00009.safetensors", + "model.layers.22.mlp.down_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.22.mlp.gate_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.22.mlp.up_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.22.post_attention_layernorm.weight": "model-00008-of-00009.safetensors", + "model.layers.22.self_attn.k_proj.bias": "model-00008-of-00009.safetensors", + "model.layers.22.self_attn.k_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.22.self_attn.o_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.22.self_attn.q_proj.bias": "model-00008-of-00009.safetensors", + "model.layers.22.self_attn.q_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.22.self_attn.v_proj.bias": "model-00008-of-00009.safetensors", + "model.layers.22.self_attn.v_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.23.input_layernorm.weight": "model-00008-of-00009.safetensors", + "model.layers.23.mlp.down_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.23.mlp.gate_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.23.mlp.up_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.23.post_attention_layernorm.weight": "model-00008-of-00009.safetensors", + "model.layers.23.self_attn.k_proj.bias": "model-00008-of-00009.safetensors", + "model.layers.23.self_attn.k_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.23.self_attn.o_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.23.self_attn.q_proj.bias": "model-00008-of-00009.safetensors", + "model.layers.23.self_attn.q_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.23.self_attn.v_proj.bias": "model-00008-of-00009.safetensors", + "model.layers.23.self_attn.v_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.24.input_layernorm.weight": "model-00008-of-00009.safetensors", + "model.layers.24.mlp.down_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.24.mlp.gate_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.24.mlp.up_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.24.post_attention_layernorm.weight": "model-00008-of-00009.safetensors", + "model.layers.24.self_attn.k_proj.bias": "model-00008-of-00009.safetensors", + "model.layers.24.self_attn.k_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.24.self_attn.o_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.24.self_attn.q_proj.bias": "model-00008-of-00009.safetensors", + "model.layers.24.self_attn.q_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.24.self_attn.v_proj.bias": "model-00008-of-00009.safetensors", + "model.layers.24.self_attn.v_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.25.input_layernorm.weight": "model-00008-of-00009.safetensors", + "model.layers.25.mlp.down_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.25.mlp.gate_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.25.mlp.up_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.25.post_attention_layernorm.weight": "model-00008-of-00009.safetensors", + "model.layers.25.self_attn.k_proj.bias": "model-00008-of-00009.safetensors", + "model.layers.25.self_attn.k_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.25.self_attn.o_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.25.self_attn.q_proj.bias": "model-00008-of-00009.safetensors", + "model.layers.25.self_attn.q_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.25.self_attn.v_proj.bias": "model-00008-of-00009.safetensors", + "model.layers.25.self_attn.v_proj.weight": "model-00008-of-00009.safetensors", + "model.layers.26.input_layernorm.weight": "model-00008-of-00009.safetensors", + "model.layers.26.mlp.down_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.26.mlp.gate_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.26.mlp.up_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.26.post_attention_layernorm.weight": "model-00009-of-00009.safetensors", + "model.layers.26.self_attn.k_proj.bias": "model-00009-of-00009.safetensors", + "model.layers.26.self_attn.k_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.26.self_attn.o_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.26.self_attn.q_proj.bias": "model-00009-of-00009.safetensors", + "model.layers.26.self_attn.q_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.26.self_attn.v_proj.bias": "model-00009-of-00009.safetensors", + "model.layers.26.self_attn.v_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.27.input_layernorm.weight": "model-00009-of-00009.safetensors", + "model.layers.27.mlp.down_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.27.mlp.gate_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.27.mlp.up_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.27.post_attention_layernorm.weight": "model-00009-of-00009.safetensors", + "model.layers.27.self_attn.k_proj.bias": "model-00009-of-00009.safetensors", + "model.layers.27.self_attn.k_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.27.self_attn.o_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.27.self_attn.q_proj.bias": "model-00009-of-00009.safetensors", + "model.layers.27.self_attn.q_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.27.self_attn.v_proj.bias": "model-00009-of-00009.safetensors", + "model.layers.27.self_attn.v_proj.weight": "model-00009-of-00009.safetensors", + "model.layers.3.input_layernorm.weight": "model-00003-of-00009.safetensors", + "model.layers.3.mlp.down_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.3.mlp.gate_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.3.mlp.up_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.3.post_attention_layernorm.weight": "model-00003-of-00009.safetensors", + "model.layers.3.self_attn.k_proj.bias": "model-00003-of-00009.safetensors", + "model.layers.3.self_attn.k_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.3.self_attn.o_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.3.self_attn.q_proj.bias": "model-00003-of-00009.safetensors", + "model.layers.3.self_attn.q_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.3.self_attn.v_proj.bias": "model-00003-of-00009.safetensors", + "model.layers.3.self_attn.v_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.4.input_layernorm.weight": "model-00003-of-00009.safetensors", + "model.layers.4.mlp.down_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.4.mlp.gate_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.4.mlp.up_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.4.post_attention_layernorm.weight": "model-00003-of-00009.safetensors", + "model.layers.4.self_attn.k_proj.bias": "model-00003-of-00009.safetensors", + "model.layers.4.self_attn.k_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.4.self_attn.o_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.4.self_attn.q_proj.bias": "model-00003-of-00009.safetensors", + "model.layers.4.self_attn.q_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.4.self_attn.v_proj.bias": "model-00003-of-00009.safetensors", + "model.layers.4.self_attn.v_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.5.input_layernorm.weight": "model-00003-of-00009.safetensors", + "model.layers.5.mlp.down_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.5.mlp.gate_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.5.mlp.up_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.5.post_attention_layernorm.weight": "model-00003-of-00009.safetensors", + "model.layers.5.self_attn.k_proj.bias": "model-00003-of-00009.safetensors", + "model.layers.5.self_attn.k_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.5.self_attn.o_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.5.self_attn.q_proj.bias": "model-00003-of-00009.safetensors", + "model.layers.5.self_attn.q_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.5.self_attn.v_proj.bias": "model-00003-of-00009.safetensors", + "model.layers.5.self_attn.v_proj.weight": "model-00003-of-00009.safetensors", + "model.layers.6.input_layernorm.weight": "model-00003-of-00009.safetensors", + "model.layers.6.mlp.down_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.6.mlp.gate_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.6.mlp.up_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.6.post_attention_layernorm.weight": "model-00004-of-00009.safetensors", + "model.layers.6.self_attn.k_proj.bias": "model-00004-of-00009.safetensors", + "model.layers.6.self_attn.k_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.6.self_attn.o_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.6.self_attn.q_proj.bias": "model-00004-of-00009.safetensors", + "model.layers.6.self_attn.q_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.6.self_attn.v_proj.bias": "model-00004-of-00009.safetensors", + "model.layers.6.self_attn.v_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.7.input_layernorm.weight": "model-00004-of-00009.safetensors", + "model.layers.7.mlp.down_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.7.mlp.gate_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.7.mlp.up_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.7.post_attention_layernorm.weight": "model-00004-of-00009.safetensors", + "model.layers.7.self_attn.k_proj.bias": "model-00004-of-00009.safetensors", + "model.layers.7.self_attn.k_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.7.self_attn.o_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.7.self_attn.q_proj.bias": "model-00004-of-00009.safetensors", + "model.layers.7.self_attn.q_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.7.self_attn.v_proj.bias": "model-00004-of-00009.safetensors", + "model.layers.7.self_attn.v_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.8.input_layernorm.weight": "model-00004-of-00009.safetensors", + "model.layers.8.mlp.down_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.8.mlp.gate_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.8.mlp.up_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.8.post_attention_layernorm.weight": "model-00004-of-00009.safetensors", + "model.layers.8.self_attn.k_proj.bias": "model-00004-of-00009.safetensors", + "model.layers.8.self_attn.k_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.8.self_attn.o_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.8.self_attn.q_proj.bias": "model-00004-of-00009.safetensors", + "model.layers.8.self_attn.q_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.8.self_attn.v_proj.bias": "model-00004-of-00009.safetensors", + "model.layers.8.self_attn.v_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.9.input_layernorm.weight": "model-00004-of-00009.safetensors", + "model.layers.9.mlp.down_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.9.mlp.gate_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.9.mlp.up_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.9.post_attention_layernorm.weight": "model-00004-of-00009.safetensors", + "model.layers.9.self_attn.k_proj.bias": "model-00004-of-00009.safetensors", + "model.layers.9.self_attn.k_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.9.self_attn.o_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.9.self_attn.q_proj.bias": "model-00004-of-00009.safetensors", + "model.layers.9.self_attn.q_proj.weight": "model-00004-of-00009.safetensors", + "model.layers.9.self_attn.v_proj.bias": "model-00004-of-00009.safetensors", + "model.layers.9.self_attn.v_proj.weight": "model-00004-of-00009.safetensors", + "model.norm.weight": "model-00009-of-00009.safetensors" + } +} diff --git a/results/eval-Qwen--Qwen2.5-Coder-7B-Instruct.json b/results/eval-Qwen--Qwen2.5-Coder-7B-Instruct.json new file mode 100644 index 0000000..b79ced8 --- /dev/null +++ b/results/eval-Qwen--Qwen2.5-Coder-7B-Instruct.json @@ -0,0 +1,11 @@ +{ + "model": "Qwen/Qwen2.5-Coder-7B-Instruct", + "n": 157, + "pass@1": 0.312, + "compile_rate": 0.471, + "outcomes": { + "compile_error": 83, + "pass": 49, + "runtime_error": 25 + } +} \ No newline at end of file diff --git a/results/eval-jgalego--ada-coder-qwen2.5-7b.json b/results/eval-jgalego--ada-coder-qwen2.5-7b.json new file mode 100644 index 0000000..d777fbf --- /dev/null +++ b/results/eval-jgalego--ada-coder-qwen2.5-7b.json @@ -0,0 +1,11 @@ +{ + "model": "jgalego/ada-coder-qwen2.5-7b", + "n": 157, + "pass@1": 0.414, + "compile_rate": 0.771, + "outcomes": { + "pass": 65, + "runtime_error": 56, + "compile_error": 36 + } +} \ No newline at end of file diff --git a/results/eval-jgalego--ada-coder-qwen2.5-7b@grpo-1.json b/results/eval-jgalego--ada-coder-qwen2.5-7b@grpo-1.json new file mode 100644 index 0000000..4501c28 --- /dev/null +++ b/results/eval-jgalego--ada-coder-qwen2.5-7b@grpo-1.json @@ -0,0 +1,11 @@ +{ + "model": "jgalego/ada-coder-qwen2.5-7b@grpo-1", + "n": 157, + "pass@1": 0.414, + "compile_rate": 0.796, + "outcomes": { + "pass": 65, + "runtime_error": 60, + "compile_error": 32 + } +} \ No newline at end of file diff --git a/results/eval-jgalego--ada-coder-qwen2.5-7b@sft-2.json b/results/eval-jgalego--ada-coder-qwen2.5-7b@sft-2.json new file mode 100644 index 0000000..35906cb --- /dev/null +++ b/results/eval-jgalego--ada-coder-qwen2.5-7b@sft-2.json @@ -0,0 +1,11 @@ +{ + "model": "jgalego/ada-coder-qwen2.5-7b@sft-2", + "n": 157, + "pass@1": 0.401, + "compile_rate": 0.771, + "outcomes": { + "pass": 63, + "runtime_error": 58, + "compile_error": 36 + } +} \ No newline at end of file diff --git a/results/samples-Qwen--Qwen2.5-Coder-7B-Instruct.jsonl b/results/samples-Qwen--Qwen2.5-Coder-7B-Instruct.jsonl new file mode 100644 index 0000000..9f9a023 --- /dev/null +++ b/results/samples-Qwen--Qwen2.5-Coder-7B-Instruct.jsonl @@ -0,0 +1,157 @@ +{"name": "HumanEval_0_has_close_elements", "outcome": "compile_error", "completion": " is\n use Ada.Float_Text_IO;\n use Ada.Text_IO;\n use Ada.Strings.Fixed;\n use Ada.Strings.Unbounded;\n use Ada.Containers.Vectors;\n use Ada.Containers.Ordered_Sets;\n use Ada.Containers.Hashed_Maps;\n use Ada.Containers.Sorted_Maps;\n use Ada.Containers.Doubly_Linked_Lists;\n use Ada.Containers.ArrayLists;\n use Ada.Containers.Stacks;\n use Ada.Containers.Queues;\n use Ada.Containers.Bounded_Vectors;\n use Ada.Containers.Bounded_Ordered_Sets;\n use Ada.Containers.Bounded_Hashed_Maps;\n use Ada.Containers.Bounded_Sorted_Maps;\n use Ada.Containers.Bounded_Doubly_Linked_Lists;\n use Ada.Containers.Bounded_ArrayLists;\n use Ada.Containers.Bounded_Stacks;\n use Ada.Containers.Bounded_Queues;\n use Ada.Containers.Bounded_Bounded_Vectors;\n use Ada.Containers.Bounded_Bounded_Ordered_Sets;\n use Ada.Containers.Bounded_Bounded_Hashed_Maps;\n use Ada.Containers.Bounded_Bounded_Sorted_Maps;\n use Ada.Containers.Bounded_Bounded_Doubly_Linked_Lists;\n use Ada.Containers.Bounded_Bounded_ArrayLists;\n use Ada.Containers.Bounded_Bounded_Stacks;\n use Ada.Containers.Bounded_Bounded_Queues;\n use Ada.Containers.Bounded_Bounded_Bounded_Vectors;\n use Ada.Containers.Bounded_Bounded_Bounded_Ordered_Sets;\n use Ada.Containers.Bounded_Bounded_Bounded_Hashed_Maps;\n use Ada.Containers.Bounded_Bounded_Bounded_Sorted_Maps;\n use Ada.Containers.Bounded_Bounded_Bounded_Doubly_Linked_Lists;\n use Ada.Containers.Bounded_Bounded_Bounded_ArrayLists;\n use Ada.Containers.Bounded_Bounded_Bounded_Stacks;\n use Ada.Containers.Bounded_Bounded_Bounded_Queues;\n use Ada.Containers.Bounded_Bounded_Bounded_Bounded_Vectors;\n use Ada.Containers.Bounded_Bounded_Bounded_Bounded_Ordered_Sets;\n use Ada.Containers.Bounded_Bounded_Bounded_Bounded_Hashed_Maps;\n use Ada.Containers.Bounded_Bounded_Bounded_Bounded_Sorted_Maps;\n use Ada.Containers.Bounded_Bounded_Bounded", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:59:49: error: missing \";\"\nprogram.ada:60:03: error: missing \"begin\" for function \"Has_Close_Elements\" at line 18\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_1_separate_paren_groups", "outcome": "compile_error", "completion": " is\n Paren_Count : Integer := 0;\n Start_Index : Positive := 1;\n Result : Unbounded_String_Array := Unbounded_String_Array'Empty;\n begin\n for I in 1 .. Paren_String'Length loop\n if Paren_String(I) = '(' then\n Paren_Count := Paren_Count + 1;\n elsif Paren_String(I) = ')' then\n Paren_Count := Paren_Count - 1;\n end if;\n if Paren_Count = 0 then\n Result := Result & To_Unbounded_String(Paren_String(Start_Index .. I));\n Start_Index := I + 1;\n end if;\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:23:65: error: unrecognized attribute \"Empty\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_2_truncate_number", "outcome": "pass", "completion": " is\n Integer_Part : constant Float := Float'Floor(Number);\n begin\n return Number - Integer_Part;", "log": ""} +{"name": "HumanEval_3_below_zero", "outcome": "pass", "completion": " is\n Balance : Integer := 0;\n begin\n for Operation of Operations loop\n Balance := Balance + Operation;\n if Balance < 0 then\n return True;\n end if;\n end loop;\n return False;", "log": ""} +{"name": "HumanEval_4_mean_absolute_deviation", "outcome": "pass", "completion": " is\n Sum : Float := 0.0;\n Mean : Float;\n MAD_Sum : Float := 0.0;\n begin\n for Number of Numbers loop\n Sum := Sum + Number;\n end loop;\n Mean := Sum / Float(Numbers'Length);\n \n for Number of Numbers loop\n MAD_Sum := MAD_Sum + abs(Number - Mean);\n end loop;\n \n return MAD_Sum / Float(Numbers'Length);", "log": ""} +{"name": "HumanEval_5_intersperse", "outcome": "pass", "completion": " is\n Result : Integer_Array(1 .. Numbers'Length * 2 - 1);\n Index : Positive := 1;\n begin\n for I in Numbers'Range loop\n Result(Index) := Numbers(I);\n Index := Index + 1;\n if I /= Numbers'Last then\n Result(Index) := Delimeter;\n Index := Index + 1;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_6_parse_nested_parens", "outcome": "compile_error", "completion": " is\n Result : Integer_Array := Integer_Array'();\n Current_Index : Natural := Paren_String'First;\n Group_Count : Positive := 0;\n Depth : Natural := 0;\n Max_Depth : Natural := 0;\n begin\n while Current_Index <= Paren_String'Last loop\n if Paren_String(Current_Index) = '(' then\n Depth := Depth + 1;\n if Depth > Max_Depth then\n Max_Depth := Depth;\n end if;\n elsif Paren_String(Current_Index) = ')' then\n Depth := Depth - 1;\n elsif Paren_String(Current_Index) = ' ' and then Depth = 0 then\n Result(Group_Count) := Max_Depth;\n Group_Count := Group_Count + 1;\n Max_Depth := 0;\n end if;\n Current_Index := Current_Index + 1;\n end loop;\n if Depth = 0 then\n Result(Group_Count) := Max_Depth;\n end if;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:18:48: error: missing operand\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_7_filter_by_substring", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array := Unbounded_String_Array'Empty;\n Found : Boolean;\n begin\n for S of Strings loop\n Found := False;\n for I in 1 .. Length(S) - Length(Substring) + 1 loop\n if Slice(S, I, I + Length(Substring) - 1) = To_Unbounded_String(Substring) then\n Found := True;\n exit;\n end if;\n end loop;\n if Found then\n Append(Result, S);\n end if;\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:20:65: error: unrecognized attribute \"Empty\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_8_sum_product", "outcome": "pass", "completion": " is\n Sum : Integer := 0;\n Product : Integer := 1;\n begin\n for Number of Numbers loop\n Sum := Sum + Number;\n Product := Product * Number;\n end loop;\n return (Sum, Product);", "log": ""} +{"name": "HumanEval_9_rolling_max", "outcome": "pass", "completion": " is\n Result : Integer_Array(Numbers'Range);\n begin\n if Numbers'Length = 0 then\n return Result;\n end if;\n \n Result(Numbers'First) := Numbers(Numbers'First);\n for I in Numbers'First + 1 .. Numbers'Last loop\n Result(I) := Integer'Max(Result(I - 1), Numbers(I));\n end loop;\n \n return Result;", "log": ""} +{"name": "HumanEval_10_make_palindrome", "outcome": "compile_error", "completion": " is\n function Is_Palindrome (S : String) return Boolean is\n L, R : Natural := S'First .. S'Last;\n begin\n while L < R loop\n if S(L) /= S(R) then\n return False;\n end if;\n L := L + 1;\n R := R - 1;\n end loop;\n return True;\n end Is_Palindrome;\n\n Palindrome_Start : Natural := My_String'Last;\n for I in reverse My_String'Range loop\n if Is_Palindrome(My_String(I..My_String'Last)) then\n Palindrome_Start := I;\n exit;\n end if;\n end loop;\n\n Prefix_To_Reverse : String := My_String(My_String'First..Palindrome_Start-1);\n Reversed_Prefix : String(Prefix_To_Reverse'Range) := Prefix_To_Reverse;\n for J in reverse Reversed_Prefix'Range loop\n Reversed_Prefix(J) := Prefix_To_Reverse(Prefix_To_Reverse'Last-J+1);\n end loop;\n\n begin\n return My_String & Reversed_Prefix;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:23:35: error: missing \";\"\nprogram.ada:43:07: error: declarations mixed with statements is a GNAT-specific extension\nprogram.ada:43:07: error: incompatible with Ada version set at line 18\nprogram.ada:43:07: error: must use pragma Extensions_Allowed (All)\nprogram.ada:51:03: error: missing \"end;\" for \"begin\" at line 49\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_11_string_xor", "outcome": "pass", "completion": " is\n Result : String := A;\n begin\n for I in 1 .. A'Length loop\n if A(I) = B(I) then\n Result(I) := '0';\n else\n Result(I) := '1';\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_12_longest", "outcome": "runtime_error", "completion": " is\n Result : Unbounded_String_Option;\n Max_Length : Natural := 0;\n begin\n if Strings'Length = 0 then\n return Result;\n end if;\n\n for S of Strings loop\n if Length (S) > Max_Length then\n Max_Length := Length (S);\n Result := (Valid => True, Value => S);\n elsif Length (S) = Max_Length then\n Result := (Valid => True, Value => S); -- Keep the first one in case of tie\n end if;\n end loop;\n\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x413a5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x405911 Main at main.adb:13\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7faaf460a248\n0x7faaf460a303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_13_greatest_common_divisor", "outcome": "compile_error", "completion": " is\n Temp : Integer;\n begin\n while B /= 0 loop\n Temp := B;\n B := A mod B;\n A := Temp;\n end loop;\n return A;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:10:10: error: assignment to \"in\" mode parameter not allowed\nplaceholder.adb:11:10: error: assignment to \"in\" mode parameter not allowed\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_14_all_prefixes", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array(1..Length(My_String));\n Index : Positive := 1;\n begin\n for I in My_String'Range loop\n Result(Index) := To_Unbounded_String(My_String(I .. I));\n Index := Index + 1;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:7:49: error: expected private type \"Ada.Strings.Unbounded.Unbounded_String\"\nplaceholder.adb:7:49: error: found type \"Standard.String\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_15_string_sequence", "outcome": "runtime_error", "completion": " is\n Result : String := \"\";\n begin\n for I in 0 .. N loop\n if I > 0 then\n Result := Result & \" \";\n end if;\n Result := Result & Integer'Image(I);\n end loop;\n return Result;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:12 length check failed\n[./main]\n0x402f8e Placeholder.String_Sequence at placeholder.adb:12\n0x40302c Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f21ff547248\n0x7f21ff547303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_16_count_distinct_characters", "outcome": "runtime_error", "completion": " is\n type Character_Set is array (Character'Range) of Boolean;\n Char_Set : Character_Set := (others => False);\n Distinct_Count : Integer := 0;\n begin\n for C of My_String loop\n if not Char_Set(C) then\n Char_Set(C) := True;\n Distinct_Count := Distinct_Count + 1;\n end if;\n end loop;\n return Distinct_Count;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x408e9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403104 Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f81735b7248\n0x7f81735b7303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_17_parse_music", "outcome": "compile_error", "completion": " is\n Result : Integer_Array := Integer_Array'();\n Index : Natural := Music_String'First;\n Last : Natural := Music_String'Last;\n Current_Note : Character;\n Beats : Integer;\n begin\n while Index <= Last loop\n Current_Note := Music_String(Index);\n case Current_Note is\n when 'o' =>\n if Index + 1 <= Last and then Music_String(Index + 1) = '|' then\n Beats := 2;\n Index := Index + 2;\n else\n Beats := 4;\n Index := Index + 1;\n end if;\n when '.' =>\n if Index + 1 <= Last and then Music_String(Index + 1) = '|' then\n Beats := 1;\n Index := Index + 2;\n else\n raise Constraint_Error with \"Invalid note format\";\n end if;\n when others =>\n raise Constraint_Error with \"Invalid note format\";\n end case;\n Result := Result & Beats;\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:22:48: error: missing operand\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_18_how_many_times", "outcome": "compile_error", "completion": " is\n Result : Integer := 0;\n Start : Natural := My_String'First;\n begin\n while Start <= My_String'Last loop\n Start := My_String.index(Substring, Start);\n if Start /= 0 then\n Result := Result + 1;\n Start := Start + 1;\n else\n exit;\n end if;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:10:19: error: invalid prefix in selected component \"My_String\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_19_sort_numbers", "outcome": "compile_error", "completion": " is\n type Number_Type is ('z' .. 'n');\n type Number_Array is array (1 .. 9) of Number_Type;\n Numbers_Map : constant Number_Array := ('z' => '0', 'e' => '1', 't' => '2', 'f' => '3', 'f' => '4', 'f' => '5', 's' => '6', 's' => '7', 'e' => '8', 'n' => '9');\n function Get_Number (Num : Number_Type) return Character is\n begin\n return Numbers_Map(Num);\n end Get_Number;\n function Compare (Left, Right : Number_Type) return Integer is\n begin\n if Left < Right then\n return -1;\n elsif Left > Right then\n return 1;\n else\n return 0;\n end if;\n end Compare;\n function Sort (Arr : Number_Array) return Number_Array is\n Result : Number_Array := Arr;\n begin\n for I in 1 .. 9 loop\n for J in I + 1 .. 9 loop\n if Compare(Result(I), Result(J)) > 0 then\n Swap(Result(I), Result(J));\n end if;\n end loop;\n end loop;\n return Result;\n end Sort;\n function Swap (A, B : in out Number_Type) is\n Temp : Number_Type;\n begin\n Temp := A;\n A := B;\n B := Temp;\n end Swap;\n function Convert_To_Number_Array (Str : String) return Number_Array is\n Result : Number_Array := (others => ' ');\n Index : Natural := 1;\n begin\n for C of Str loop\n if C = ' ' then\n Index := Index + 1;\n else\n Result(Index) := C;\n end if;\n end loop;\n return Result;\n end Convert_To_Number_Array;\n function Convert_To_String (Arr : Number_Array) return String is\n Result : String := \"\";\n begin\n for Num of Arr loop\n Result := Result & Get_Number(Num);\n end loop;\n return Result;\n end Convert_To_String;\n begin\n return Convert_To_String(Sort(Convert_To_Number_Array(Numbers)));", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:17:31: error: missing \",\"\nprogram.ada:46:49: error: missing \"return\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_20_find_closest_elements", "outcome": "pass", "completion": " is\n Closest_Difference : Float := Float'Last;\n Result : Float_Float_Tuple;\n begin\n for I in Numbers'Range loop\n for J in I + 1 .. Numbers'Last loop\n declare\n Difference : constant Float := abs (Numbers(I) - Numbers(J));\n begin\n if Difference < Closest_Difference then\n Closest_Difference := Difference;\n Result.Float_1 := Float'Min (Numbers(I), Numbers(J));\n Result.Float_2 := Float'Max (Numbers(I), Numbers(J));\n end if;\n end;\n end loop;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_21_rescale_to_unit", "outcome": "pass", "completion": " is\n Min_Value, Max_Value : Float := Numbers(1);\n Result : Float_Array(Numbers'Range);\n begin\n for Number of Numbers loop\n if Number < Min_Value then\n Min_Value := Number;\n elsif Number > Max_Value then\n Max_Value := Number;\n end if;\n end loop;\n\n for I in Numbers'Range loop\n Result(I) := (Numbers(I) - Min_Value) / (Max_Value - Min_Value);\n end loop;\n\n return Result;", "log": ""} +{"name": "HumanEval_23_strlen", "outcome": "pass", "completion": " is\n Length : Integer := 0;\n begin\n for C of My_String loop\n Length := Length + 1;\n end loop;\n return Length;", "log": ""} +{"name": "HumanEval_24_largest_divisor", "outcome": "pass", "completion": " is\n Divisor : Integer := N / 2;\n begin\n while Divisor > 0 loop\n if N mod Divisor = 0 then\n return Divisor;\n end if;\n Divisor := Divisor - 1;\n end loop;\n return 1; -- If no divisor found other than 1, return 1", "log": ""} +{"name": "HumanEval_25_factorize", "outcome": "compile_error", "completion": " is\n Result : Integer_Array := Integer_Array'();\n I : Integer := 2;\n begin\n while N > 1 loop\n if N mod I = 0 then\n Result := Result & I;\n N := N / I;\n else\n I := I + 1;\n end if;\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:22:48: error: missing operand\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_26_remove_duplicates", "outcome": "compile_error", "completion": " is\n type Counted_Integer is record\n Value : Integer;\n Count : Natural := 0;\n end record;\n package Counted_Integer_Arrays is new Vectors.Counted (Counted_Integer);\n use Counted_Integer_Arrays;\n Counts : Counted_Integer_Array := Empty_Counted_Integer_Array;\n Result : Integer_Array := Numbers;\n Index : Positive := 0;\n begin\n for Number of Numbers loop\n declare\n Found : Boolean := False;\n begin\n for I in 1 .. Counts.Length loop\n if Counts(I).Value = Number then\n Counts(I).Count := Counts(I).Count + 1;\n Found := True;\n exit;\n end if;\n end loop;\n if not Found then\n Append (Counts, (Number, 1));\n end if;\n end;\n end loop;\n for I in 1 .. Counts.Length loop\n if Counts(I).Count = 1 then\n Result(Index) := Counts(I).Value;\n Index := Index + 1;\n end if;\n end loop;\n return Slice (Result, 1, Index - 1);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:10:45: error: \"Vectors\" is undefined\nplaceholder.adb:11:11: error: \"Counted_Integer_Arrays\" is undefined\nplaceholder.adb:12:16: error: \"Counted_Integer_Array\" is undefined\nplaceholder.adb:12:41: error: \"Empty_Counted_Integer_Array\" is undefined\nplaceholder.adb:14:27: warning: value not in range of type \"Standard.Positive\" [enabled by default]\nplaceholder.adb:14:27: warning: Constraint_Error will be raised at run time [enabled by default]\nplaceholder.adb:20:27: error: invalid prefix in selected component \"Counts\"\nplaceholder.adb:28:16: error: \"Append\" is undefined\nplaceholder.adb:32:21: error: invalid prefix in selected component \"Counts\"\nplaceholder.adb:38:14: error: \"Slice\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_27_flip_case", "outcome": "compile_error", "completion": " is\n Result : String := My_String;\n begin\n for I in 1 .. Length(Result) loop\n if Is_Lower(Result(I)) then\n Result(I) := To_Upper(Result(I));\n elsif Is_Upper(Result(I)) then\n Result(I) := To_Lower(Result(I));\n end if;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:8:21: error: \"Length\" is undefined\nplaceholder.adb:9:13: error: \"Is_Lower\" is undefined\nplaceholder.adb:10:26: error: \"To_Upper\" is undefined\nplaceholder.adb:11:16: error: \"Is_Upper\" is undefined\nplaceholder.adb:12:26: error: \"To_Lower\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_28_concatenate", "outcome": "runtime_error", "completion": " is\n Result : String := \"\";\n begin\n for S of Strings loop\n Result := Result & To_String(S);\n end loop;\n return Result;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:10 length check failed\n[./main]\n0x404189 Placeholder.Concatenate at placeholder.adb:10\n0x404564 Main at main.adb:13\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7ff77f659248\n0x7ff77f659303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_29_filter_by_prefix", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array := Unbounded_String_Array'Empty;\n Count : Natural := 0;\n begin\n for S of Strings loop\n if StartsWith(S, Prefix) then\n Count := Count + 1;\n Result := Result & S;\n end if;\n end loop;\n return Result(1 .. Count);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:20:65: error: unrecognized attribute \"Empty\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_30_get_positive", "outcome": "pass", "completion": " is\n Positive_Count : Natural := 0;\n Result : Integer_Array(L'Range);\n begin\n for I in L'Range loop\n if L(I) > 0 then\n Positive_Count := Positive_Count + 1;\n Result(Positive_Count) := L(I);\n end if;\n end loop;\n return Result(1 .. Positive_Count);", "log": ""} +{"name": "HumanEval_31_is_prime", "outcome": "pass", "completion": " is\n I : Integer := 2;\n begin\n if N <= 1 then\n return False;\n end if;\n while I * I <= N loop\n if N mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_33_sort_third", "outcome": "compile_error", "completion": " is\n Sorted_L : Integer_Array := L;\n Indices : Positive_Set.Set;\n begin\n for I in L'Range loop\n if I mod 3 = 0 then\n Indices.Include(I);\n end if;\n end loop;\n declare\n Indexes_Array : Positive_Set.Vector := Indices.To_Vector;\n Values : Integer_Array(1 .. Indexes_Array.Length);\n begin\n for J in Indexes_Array.Iterate loop\n Values(J) := Sorted_L(Indexes_Array.Element(J));\n end loop;\n Quick_Sort(Values);\n for K in Indexes_Array.Iterate loop\n Sorted_L(Indexes_Array.Element(K)) := Values(K);\n end loop;\n end;\n return Sorted_L;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:7:17: error: \"Positive_Set\" is undefined (more references follow)\nplaceholder.adb:11:13: error: invalid prefix in selected component \"Indices\"\nplaceholder.adb:15:49: error: invalid prefix in selected component \"Indices\"\nplaceholder.adb:16:38: error: invalid prefix in selected component \"Indexes_Array\"\nplaceholder.adb:18:19: error: invalid prefix in selected component \"Indexes_Array\"\nplaceholder.adb:19:35: error: invalid prefix in selected component \"Indexes_Array\"\nplaceholder.adb:21:10: error: \"Quick_Sort\" is undefined\nplaceholder.adb:22:19: error: invalid prefix in selected component \"Indexes_Array\"\nplaceholder.adb:23:22: error: invalid prefix in selected component \"Indexes_Array\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_34_unique", "outcome": "compile_error", "completion": " is\n use Ada.Containers;\n use Ada.Containers.Sorted_Sets;\n Set : Sorted_Set (Integer);\n Result : Integer_Array := (others => <>);\n begin\n for I of L loop\n Set.Insert (I);\n end loop;\n Result := To_Array (Set);\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:6:11: error: \"Ada\" is undefined (more references follow)\nplaceholder.adb:6:11: error: missing \"with Ada.Containers;\"\nplaceholder.adb:8:13: error: \"Sorted_Set\" is undefined\nplaceholder.adb:8:24: error: incorrect constraint for this kind of type\nplaceholder.adb:9:34: error: \"others\" choice not allowed here\nplaceholder.adb:9:34: error: qualify the aggregate with a constrained subtype to provide bounds for it\nplaceholder.adb:12:10: error: invalid prefix in selected component \"Set\"\nplaceholder.adb:14:17: error: \"To_Array\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_35_max_element", "outcome": "pass", "completion": " is\n Max : Integer := L(1);\n begin\n for I in L'Range loop\n if L(I) > Max then\n Max := L(I);\n end if;\n end loop;\n return Max;", "log": ""} +{"name": "HumanEval_36_fizz_buzz", "outcome": "pass", "completion": " is\n Count : Integer := 0;\n begin\n for I in 1 .. N - 1 loop\n if I mod 11 = 0 or else I mod 13 = 0 then\n declare\n S : String := Integer'Image(I);\n J : Natural := S'First;\n begin\n while J <= S'Last loop\n if S(J) = '7' then\n Count := Count + 1;\n end if;\n J := J + 1;\n end loop;\n end;\n end if;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_37_sort_even", "outcome": "compile_error", "completion": " is\n Even_Elements : Integer_Array(L'First .. L'Last / 2);\n Result : Integer_Array(L'Range);\n begin\n for I in L'First .. L'Last / 2 loop\n Even_Elements(I) := L(2 * I - 1);\n end loop;\n Even_Elements := Sort(Even_Elements); -- Assuming Sort is defined elsewhere\n for I in L'First .. L'Last / 2 loop\n Result(2 * I - 1) := L(2 * I - 1);\n Result(2 * I) := Even_Elements(I);\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:12:24: error: \"Sort\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_39_prime_fib", "outcome": "compile_error", "completion": " is\n function Is_Prime (X : Integer) return Boolean is\n I : Integer := 2;\n begin\n if X <= 1 then\n return False;\n end if;\n while I * I <= X loop\n if X mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;\n end Is_Prime;\n\n function Fibonacci (K : Integer) return Integer is\n A, B, C : Integer := 0, 1, 0;\n begin\n for _ in 1 .. K loop\n C := A + B;\n A := B;\n B := C;\n end loop;\n return C;\n end Fibonacci;\n\n Count : Integer := 0;\n Index : Integer := 0;\n begin\n loop\n Index := Index + 1;\n if Is_Prime(Fibonacci(Index)) then\n Count := Count + 1;\n if Count = N then\n return Fibonacci(Index);\n end if;\n end if;\n end loop;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:39:32: error: \",\" should be \";\"\nprogram.ada:41:14: error: identifier cannot start with underline\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_40_triples_sum_to_zero", "outcome": "pass", "completion": " is\n N : Natural := L'Length;\n begin\n for I in 1 .. N - 2 loop\n for J in I + 1 .. N - 1 loop\n for K in J + 1 .. N loop\n if L(I) + L(J) + L(K) = 0 then\n return True;\n end if;\n end loop;\n end loop;\n end loop;\n return False;", "log": ""} +{"name": "HumanEval_41_car_race_collision", "outcome": "pass", "completion": " is\n begin\n -- Since every car going left to right will eventually collide with every car\n -- going right to left, the total number of collisions will be N * N.\n return N * N;", "log": ""} +{"name": "HumanEval_42_incr_list", "outcome": "pass", "completion": " is\n Result : Integer_Array(L'Range);\n begin\n for I in L'Range loop\n Result(I) := L(I) + 1;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_43_pairs_sum_to_zero", "outcome": "compile_error", "completion": " is\n use Ada.Containers;\n Set : Hash_Set (Integer);\n begin\n for I of L loop\n if Set.Contains (-I) then\n return True;\n end if;\n Set.Insert (I);\n end loop;\n return False;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:6:11: error: \"Ada\" is undefined\nplaceholder.adb:6:11: error: missing \"with Ada.Containers;\"\nplaceholder.adb:7:13: error: \"Hash_Set\" is undefined\nplaceholder.adb:7:22: error: incorrect constraint for this kind of type\nplaceholder.adb:10:13: error: invalid prefix in selected component \"Set\"\nplaceholder.adb:13:10: error: invalid prefix in selected component \"Set\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_44_change_base", "outcome": "compile_error", "completion": " is\n Result : String := \"\";\n Remainder : Integer;\n begin\n if X = 0 then\n return \"0\";\n end if;\n\n while X /= 0 loop\n Remainder := X mod Base;\n Result := Character'Val('0' + Remainder) & Result;\n X := X / Base;\n end loop;\n\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:15:34: error: expected type \"Standard.Integer\"\nplaceholder.adb:15:34: error: found a character type\nplaceholder.adb:16:10: error: assignment to \"in\" mode parameter not allowed\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_45_triangle_area", "outcome": "pass", "completion": " is\n begin\n return 0.5 * Float(A) * Float(H);", "log": ""} +{"name": "HumanEval_46_fib4", "outcome": "runtime_error", "completion": " is\n A, B, C, D, E : Integer := 0;\n begin\n if N < 2 then\n return 0;\n elsif N = 2 then\n return 2;\n end if;\n\n for I in 3 .. N loop\n E := A + B + C + D;\n A := B;\n B := C;\n C := D;\n D := E;\n end loop;\n\n return E;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408e1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40307e Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fe7be9d5248\n0x7fe7be9d5303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_47_median", "outcome": "compile_error", "completion": " is\n Sorted_L : Integer_Array := L;\n Length : Natural := L'Length;\n Mid : Natural := Length / 2;\n begin\n for I in 1 .. Length - 1 loop\n for J in 1 .. Length - I loop\n if Sorted_L(J) > Sorted_L(J + 1) then\n Sorted_L(J), Sorted_L(J + 1) := Sorted_L(J + 1), Sorted_L(J);\n end if;\n end loop;\n end loop;\n if Length mod 2 = 0 then\n return Float(Sorted_L(Mid) + Sorted_L(Mid + 1)) / 2.0;\n else\n return Float(Sorted_L(Mid + 1));\n end if;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:25:27: error: \",\" should be \";\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_48_is_palindrome", "outcome": "runtime_error", "completion": " is\n First, Last : Natural := Text'First;\n begin\n while First < Last loop\n if Text(First) /= Text(Last) then\n return False;\n end if;\n First := First + 1;\n Last := Last - 1;\n end loop;\n return True;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:14\n[./main]\n0x40901f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403218 Main at main.adb:14\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f652ade6248\n0x7f652ade6303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_49_modp", "outcome": "compile_error", "completion": " is\n Result : Integer := 1;\n Base : Integer := 2;\n begin\n while N > 0 loop\n if N mod 2 = 1 then\n Result := (Result * Base) mod P;\n end if;\n Base := (Base * Base) mod P;\n N := N / 2;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:14:10: error: assignment to \"in\" mode parameter not allowed\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_51_remove_vowels", "outcome": "compile_error", "completion": " is\n Result : String := \"\";\n Index : Natural := Text'First;\n begin\n while Index <= Text'Last loop\n if not Is_Vowel(Text(Index)) then\n Result := Result & Text(Index);\n end if;\n Index := Index + 1;\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:47:37: error: missing string quote\nprogram.ada:48:08: error: binary operator expected\nprogram.ada:49:08: error: missing string quote\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_52_below_threshold", "outcome": "pass", "completion": " is\n Result : Boolean := True;\n begin\n for I in L'Range loop\n if L(I) >= T then\n Result := False;\n exit;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_53_add", "outcome": "pass", "completion": " is\n begin\n return X + Y;", "log": ""} +{"name": "HumanEval_54_same_chars", "outcome": "pass", "completion": " is\n type Char_Set is array (Character) of Boolean;\n Set0, Set1 : Char_Set := (others => False);\n begin\n for C of S0 loop\n Set0(C) := True;\n end loop;\n for C of S1 loop\n Set1(C) := True;\n end loop;\n for C in Character'Range loop\n if Set0(C) /= Set1(C) then\n return False;\n end if;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_55_fib", "outcome": "compile_error", "completion": " is\n A, B, C : Integer := 0, 1, 0;\n begin\n if N = 0 then\n return A;\n elsif N = 1 then\n return B;\n else\n for I in 2 .. N loop\n C := A + B;\n A := B;\n B := C;\n end loop;\n return C;\n end if;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:19:29: error: \",\" should be \";\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_56_correct_bracketing", "outcome": "pass", "completion": " is\n Count : Integer := 0;\n begin\n for Bracket of Brackets loop\n if Bracket = '<' then\n Count := Count + 1;\n elsif Bracket = '>' then\n Count := Count - 1;\n end if;\n exit when Count < 0; -- Early exit if more closing brackets are found\n end loop;\n return Count = 0; -- True if all brackets are correctly matched", "log": ""} +{"name": "HumanEval_57_monotonic", "outcome": "pass", "completion": " is\n Is_Increasing : Boolean := True;\n Is_Decreasing : Boolean := True;\n begin\n for I in L'Range loop\n if I > L'First then\n if L(I) < L(I - 1) then\n Is_Increasing := False;\n elsif L(I) > L(I - 1) then\n Is_Decreasing := False;\n end if;\n end if;\n end loop;\n return Is_Increasing or else Is_Decreasing;", "log": ""} +{"name": "HumanEval_58_common", "outcome": "compile_error", "completion": " is\n use Ada.Containers;\n use Ada.Containers.Sorted_Sets;\n Set1, Set2 : Sorted_Set;\n Result : Sorted_Set;\n begin\n for I in L1'Range loop\n Set1.Insert(L1(I));\n end loop;\n for I in L2'Range loop\n Set2.Insert(L2(I));\n end loop;\n for E of Set1 loop\n if Set2.Contains(E) then\n Result.Insert(E);\n end if;\n end loop;\n return To_Array(Result);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:6:11: error: \"Ada\" is undefined (more references follow)\nplaceholder.adb:6:11: error: missing \"with Ada.Containers;\"\nplaceholder.adb:8:20: error: \"Sorted_Set\" is undefined (more references follow)\nplaceholder.adb:12:10: error: invalid prefix in selected component \"Set1\"\nplaceholder.adb:15:10: error: invalid prefix in selected component \"Set2\"\nplaceholder.adb:18:13: error: invalid prefix in selected component \"Set2\"\nplaceholder.adb:19:13: error: invalid prefix in selected component \"Result\"\nplaceholder.adb:22:14: error: \"To_Array\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_59_largest_prime_factor", "outcome": "compile_error", "completion": " is\n Factor : Integer := 2;\n Result : Integer := 1;\n begin\n while N > 1 loop\n if N mod Factor = 0 then\n Result := Factor;\n N := N / Factor;\n else\n Factor := Factor + 1;\n end if;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:12:13: error: assignment to \"in\" mode parameter not allowed\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_60_sum_to_n", "outcome": "pass", "completion": " is\n Result : Integer := 0;\n begin\n for I in 1 .. N loop\n Result := Result + I;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_61_correct_bracketing", "outcome": "pass", "completion": " is\n Count : Integer := 0;\n begin\n for Bracket of Brackets loop\n if Bracket = '(' then\n Count := Count + 1;\n elsif Bracket = ')' then\n Count := Count - 1;\n if Count < 0 then\n return False;\n end if;\n end if;\n end loop;\n return Count = 0;", "log": ""} +{"name": "HumanEval_62_derivative", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array := Xs;\n begin\n for I in 1 .. Xs'Length - 1 loop\n Result(I) := Xs(I) * I;\n end loop;\n Result(Xs'Last) := 0;\n return Result(1 .. Xs'Length - 1);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40971f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403410 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f44fa03a248\n0x7f44fa03a303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_63_fibfib", "outcome": "runtime_error", "completion": " is\n A, B, C, D : Integer := 0;\n begin\n if N = 0 or N = 1 then\n return 0;\n elsif N = 2 then\n return 1;\n end if;\n for I in 3 .. N loop\n D := A + B + C;\n A := B;\n B := C;\n C := D;\n end loop;\n return D;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x408e5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4030c3 Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f4134b6c248\n0x7f4134b6c303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_64_vowels_count", "outcome": "pass", "completion": " is\n Count : Integer := 0;\n begin\n for I in S'Range loop\n if S(I) = 'a' or else S(I) = 'e' or else S(I) = 'i' or else S(I) = 'o' or else S(I) = 'u' then\n Count := Count + 1;\n elsif S(I) = 'A' or else S(I) = 'E' or else S(I) = 'I' or else S(I) = 'O' or else S(I) = 'U' then\n Count := Count + 1;\n elsif S(I) = 'y' or else S(I) = 'Y' then\n if I = S'Last then\n Count := Count + 1;\n end if;\n end if;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_65_circular_shift", "outcome": "compile_error", "completion": " is\n Digits : constant String := Integer'Image(X);\n Num_Digits : constant Natural := Digits'Length - 1;\n Actual_Shift : Natural;\n begin\n if Shift = 0 then\n return Digits(2 .. Digits'Last);\n elsif Shift > Num_Digits then\n Actual_Shift := Num_Digits mod Shift;\n else\n Actual_Shift := Shift;\n end if;\n return Digits(Digits'Last - Actual_Shift + 2 .. Digits'Last) & Digits(2 .. Digits'Last - Actual_Shift + 1);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:19:07: error: reserved word \"digits\" cannot be used as identifier\nprogram.ada:20:46: error: prefix of attribute must be a name\nprogram.ada:20:46: error: qualify expression to turn it into a name\nprogram.ada:24:23: error: binary operator expected\nprogram.ada:30:20: error: binary operator expected\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_66_digitSum", "outcome": "pass", "completion": " is\n Sum : Integer := 0;\n begin\n for C of S loop\n if C in 'A' .. 'Z' then\n Sum := Sum + Character'Pos(C);\n end if;\n end loop;\n return Sum;", "log": ""} +{"name": "HumanEval_67_fruit_distribution", "outcome": "runtime_error", "completion": " is\n Apple_Count, Orange_Count : Integer := 0;\n Start_Index, End_Index : Natural := S'First;\n begin\n -- Find the index of \"apples\" and extract the count\n while S(Start_Index .. End_Index) /= \"apples\" loop\n if S(End_Index) = ' ' then\n Start_Index := End_Index + 1;\n end if;\n End_Index := End_Index + 1;\n end loop;\n Apple_Count := Integer'Value(S(Start_Index - 2 .. Start_Index - 4));\n\n -- Reset indices to find the index of \"oranges\" and extract the count\n Start_Index := S'First;\n End_Index := S'First;\n while S(Start_Index .. End_Index) /= \"oranges\" loop\n if S(End_Index) = ' ' then\n Start_Index := End_Index + 1;\n end if;\n End_Index := End_Index + 1;\n end loop;\n Orange_Count := Integer'Value(S(Start_Index - 2 .. Start_Index - 7));\n\n -- Calculate the number of mangoes\n return N - (Apple_Count + Orange_Count);", "log": "\nraised CONSTRAINT_ERROR : bad input for 'Value: \"\"\n[./main]\n0x410c40 System.Val_Util.Bad_Value at s-valuti.adb:61\n0x410fb4 System.Val_Util.Scan_Sign at s-valuti.adb:316\n0x410557 System.Val_Int.Impl.Scan_Integer at s-valuei.adb:94\n0x410620 System.Val_Int.Impl.Value_Integer at s-valuei.adb:176\n0x403105 Placeholder.Fruit_Distribution at placeholder.adb:16\n0x40332d Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fb7f234a248\n0x7fb7f234a303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_68_pluck", "outcome": "compile_error", "completion": " is\n Smallest_Even : Integer := Integer'Last;\n Index : Positive := Arr'First - 1;\n begin\n for I in Arr'Range loop\n if Arr(I) mod 2 = 0 then\n if Arr(I) < Smallest_Even or else (Arr(I) = Smallest_Even and then I < Index) then\n Smallest_Even := Arr(I);\n Index := I;\n end if;\n end if;\n end loop;\n if Index = Arr'First - 1 then\n return Integer_Array'Empty;\n else\n return Integer_Array'(Smallest_Even, Index);\n end if;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:50:31: error: unrecognized attribute \"Empty\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_69_search", "outcome": "compile_error", "completion": " is\n type Frequency_Map is array (Integer range <>) of Natural;\n Freq : Frequency_Map := (others => 0);\n Max_Freq : Integer := -1;\n begin\n for I in Lst'Range loop\n Freq(Lst(I)) := Freq(Lst(I)) + 1;\n if Freq(Lst(I)) >= Lst(I) and then Lst(I) > Max_Freq then\n Max_Freq := Lst(I);\n end if;\n end loop;\n return Max_Freq;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:7:32: error: \"others\" choice not allowed here\nplaceholder.adb:7:32: error: qualify the aggregate with a constrained subtype to provide bounds for it\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_70_strange_sort_list", "outcome": "compile_error", "completion": " is\n Result : Integer_Array(Lst'Range);\n Min_Index, Max_Index : Positive;\n Min_Value, Max_Value : Integer;\n Index : Natural := Lst'First;\n begin\n if Lst'Length = 0 then\n return Result;\n end if;\n\n loop\n Min_Value := Integer'Last;\n Max_Value := Integer'First;\n\n for I in Lst'Range loop\n if Lst(I) <= Min_Value then\n Min_Value := Lst(I);\n Min_Index := I;\n elsif Lst(I) >= Max_Value then\n Max_Value := Lst(I);\n Max_Index := I;\n end if;\n end loop;\n\n Result(Index) := Min_Value;\n Index := Index + 1;\n\n if Min_Index /= Max_Index then\n Result(Index) := Max_Value;\n Index := Index + 1;\n end if;\n\n Lst(Min_Index .. Max_Index) := Lst(Min_Index + 1 .. Max_Index) & Lst(Min_Index);\n\n exit when Index > Lst'Last;\n end loop;\n\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:37:10: error: left hand side of assignment must be a variable\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_71_triangle_area", "outcome": "compile_error", "completion": " is\n S : Float;\n Area : Float;\n begin\n if A + B > C and then A + C > B and then B + C > A then\n S := (Float(A) + Float(B) + Float(C)) / 2.0;\n Area := sqrt(S * (S - Float(A)) * (S - Float(B)) * (S - Float(C)));\n return Float'Round(Area * 100.0) / 100.0;\n else\n return -1.0;\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:12:40: error: invalid operand types for operator \"=\"\nmain.adb:12:40: error: left operand has type \"Standard.Float\"\nmain.adb:12:40: error: right operand has type universal integer\nmain.adb:15:39: error: invalid operand types for operator \"=\"\nmain.adb:15:39: error: left operand has type \"Standard.Float\"\nmain.adb:15:39: error: right operand has type universal integer\nmain.adb:17:39: error: invalid operand types for operator \"=\"\nmain.adb:17:39: error: left operand has type \"Standard.Float\"\nmain.adb:17:39: error: right operand has type universal integer\nmain.adb:19:40: error: invalid operand types for operator \"=\"\nmain.adb:19:40: error: left operand has type \"Standard.Float\"\nmain.adb:19:40: error: right operand has type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_72_will_it_fly", "outcome": "pass", "completion": " is\n Sum : Integer := 0;\n Is_Balanced : Boolean := True;\n begin\n for I in Q'Range loop\n Sum := Sum + Q(I);\n if Q(I) /= Q(Q'Last - I + 1) then\n Is_Balanced := False;\n exit;\n end if;\n end loop;\n return Is_Balanced and then Sum <= W;", "log": ""} +{"name": "HumanEval_73_smallest_change", "outcome": "pass", "completion": " is\n Left : Positive := Arr'First;\n Right : Positive := Arr'Last;\n Count : Natural := 0;\n begin\n while Left < Right loop\n if Arr(Left) /= Arr(Right) then\n Count := Count + 1;\n end if;\n Left := Left + 1;\n Right := Right - 1;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_74_total_match", "outcome": "pass", "completion": " is\n Total_Chars_Lst1 : Natural := 0;\n Total_Chars_Lst2 : Natural := 0;\n begin\n for Str of Lst1 loop\n Total_Chars_Lst1 := Total_Chars_Lst1 + Length(Str);\n end loop;\n \n for Str of Lst2 loop\n Total_Chars_Lst2 := Total_Chars_Lst2 + Length(Str);\n end loop;\n \n if Total_Chars_Lst1 <= Total_Chars_Lst2 then\n return Lst1;\n else\n return Lst2;\n end if;", "log": ""} +{"name": "HumanEval_75_is_multiply_prime", "outcome": "compile_error", "completion": " is\n function Is_Prime (N : Integer) return Boolean is\n I : Integer := 2;\n begin\n while I <= N / 2 loop\n if N mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;\n end Is_Prime;\n\n Prime_Count : Integer := 0;\n Divisor : Integer := 2;\n begin\n while A > 1 loop\n if A mod Divisor = 0 and then Is_Prime(Divisor) then\n Prime_Count := Prime_Count + 1;\n A := A / Divisor;\n else\n Divisor := Divisor + 1;\n end if;\n end loop;\n return Prime_Count = 3;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:24:13: error: assignment to \"in\" mode parameter not allowed\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_76_is_simple_power", "outcome": "runtime_error", "completion": " is\n Power : Integer := 1;\n begin\n if X = 1 then\n return N = 1 or N = 0;\n end if;\n while Power < X loop\n Power := Power * N;\n end loop;\n return Power = X;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:20\n[./main]\n0x408edf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40320c Main at main.adb:20\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f2caafbf248\n0x7f2caafbf303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_77_iscube", "outcome": "compile_error", "completion": " is\n B : Integer := 0;\n begin\n while B * B * B < A loop\n B := B + 1;\n end loop;\n return B * B * B = A or else -B * -B * -B = A;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:33:41: error: parentheses required for unary minus\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_78_hex_key", "outcome": "pass", "completion": " is\n Count : Integer := 0;\n begin\n for I in Num'Range loop\n case Num(I) is\n when '2' | '3' | '5' | '7' | 'B' | 'D' =>\n Count := Count + 1;\n when others =>\n null;\n end case;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_79_decimal_to_binary", "outcome": "compile_error", "completion": " is\n Binary : String := \"\";\n Remainder : Integer;\n begin\n if Decimal = 0 then\n return \"db0db\";\n end if;\n\n while Decimal > 0 loop\n Remainder := Decimal mod 2;\n Binary := Character'Val(Remainder + Character'Pos('0')) & Binary;\n Decimal := Decimal / 2;\n end loop;\n\n return \"db\" & Binary & \"db\";", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:15:66: warning: too many elements for subtype of \"Standard.String\" defined at line 6 [enabled by default]\nplaceholder.adb:15:66: warning: expected 0 elements; found 1 element [enabled by default]\nplaceholder.adb:15:66: warning: Constraint_Error will be raised at run time [enabled by default]\nplaceholder.adb:16:10: error: assignment to \"in\" mode parameter not allowed\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_80_is_happy", "outcome": "pass", "completion": " is\n L : Natural := S'Length;\n begin\n if L < 3 then\n return False;\n end if;\n for I in 1 .. L - 2 loop\n if S(I) = S(I + 1) or else S(I) = S(I + 2) or else S(I + 1) = S(I + 2) then\n return False;\n end if;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_81_numerical_letter_grade", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array(Grades'Range);\n begin\n for I in Grades'Range loop\n if Grades(I) = 4.0 then\n Result(I) := To_Unbounded_String(\"A+\");\n elsif Grades(I) > 3.7 then\n Result(I) := To_Unbounded_String(\"A\");\n elsif Grades(I) > 3.3 then\n Result(I) := To_Unbounded_String(\"A-\");\n elsif Grades(I) > 3.0 then\n Result(I) := To_Unbounded_String(\"B+\");\n elsif Grades(I) > 2.7 then\n Result(I) := To_Unbounded_String(\"B\");\n elsif Grades(I) > 2.3 then\n Result(I) := To_Unbounded_String(\"B-\");\n elsif Grades(I) > 2.0 then\n Result(I) := To_Unbounded_String(\"C+\");\n elsif Grades(I) > 1.7 then\n Result(I) := To_Unbounded_String(\"C\");\n elsif Grades(I) > 1.3 then\n Result(I) := To_Unbounded_String(\"C-\");\n elsif Grades(I) > 1.0 then\n Result(I) := To_Unbounded_String(\"D+\");\n elsif Grades(I) > 0.7 then\n Result(I) := To_Unbounded_String(\"D\");\n elsif Grades(I) > 0.0 then\n Result(I) := To_Unbounded_String(\"D-\");\n else\n Result(I) := To_Unbounded_String(\"E\");\n end if;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:12:36: error: expected type \"Standard.Float\"\nmain.adb:12:36: error: found type universal integer\nmain.adb:12:44: error: expected type \"Standard.Float\"\nmain.adb:12:44: error: found type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_82_prime_length", "outcome": "pass", "completion": " is\n Length : Natural := My_String'Length;\n Is_Prime : Boolean := True;\n begin\n if Length <= 1 then\n return False;\n end if;\n \n for I in 2 .. Length / 2 loop\n if Length mod I = 0 then\n Is_Prime := False;\n exit;\n end if;\n end loop;\n \n return Is_Prime;", "log": ""} +{"name": "HumanEval_83_starts_one_ends", "outcome": "compile_error", "completion": " is\n -- If N = 1, there's only one number: 1 itself.\n -- For N > 1, we calculate the count as follows:\n -- - Numbers starting with 1: 10^(N-1)\n -- - Numbers ending with 1: 10^(N-1)\n -- - Subtract the overlap (numbers both starting and ending with 1): 10^(N-2)\n begin\n if N = 1 then\n return 1;\n else\n return 2 * 10**(N-1) - 10**(N-2);\n end if;\n end Starts_One_Ends;\nend Placeholder;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\nprogram.ada:27:04: error: compilation unit expected\nprogram.ada:32:01: error: misplaced \"with\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_84_solve", "outcome": "compile_error", "completion": " is\n Sum : Integer := 0;\n Temp : Integer := N;\n begin\n while Temp > 0 loop\n Sum := Sum + (Temp mod 10);\n Temp := Temp / 10;\n end loop;\n return Convert_to_Binary(Sum);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:13:14: error: \"Convert_to_Binary\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_85_add", "outcome": "runtime_error", "completion": " is\n Sum : Integer := 0;\n begin\n for I in Lst'Range loop\n if I mod 2 /= 0 and then Lst(I) mod 2 = 0 then\n Sum := Sum + Lst(I);\n end if;\n end loop;\n return Sum;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408e1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40305d Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fd5467fd248\n0x7fd5467fd303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_86_anti_shuffle", "outcome": "compile_error", "completion": " is\n use Ada.Strings.Fixed;\n Result : String := S;\n Start : Natural := 1;\n End : Natural;\n begin\n loop\n End := Index(Result, ' ', Start);\n if End = 0 then\n End := Length(Result);\n end if;\n declare\n Word : String := Result(Start .. End);\n Sorted_Word : String := Word;\n begin\n for I in 1 .. Length(Sorted_Word) - 1 loop\n for J in I + 1 .. Length(Sorted_Word) loop\n if Sorted_Word(I) > Sorted_Word(J) then\n Swap(Sorted_Word(I), Sorted_Word(J));\n end if;\n end loop;\n end loop;\n Result(Start .. End) := Sorted_Word;\n end;\n Start := End + 1;\n exit when Start > Length(Result);\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:27:06: error: missing \"begin\" for function \"Anti_Shuffle\" at line 23\nprogram.ada:27:07: error: reserved word \"end\" cannot be used as identifier\nprogram.ada:51:03: error: missing \"end;\" for \"begin\" at line 28\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_87_get_row", "outcome": "compile_error", "completion": " is\n Result : Integer_Integer_Tuple_Array := Integer_Integer_Tuple_Array'Empty;\n Row_Index : Positive := Lst'First;\n begin\n for Row of Lst loop\n Column_Index : Positive := Row.First;\n while Column_Index <= Row.Last loop\n if Row(Column_Index) = X then\n Result := Result & Integer_Integer_Tuple'(Row_Index - 1, Row.Last - Column_Index + 1);\n end if;\n Column_Index := Column_Index + 1;\n end loop;\n Row_Index := Row_Index + 1;\n end loop;\n -- Sort by rows in ascending order\n for I in Result'Range loop\n for J in I + 1 .. Result'Last loop\n if Result(I).Integer_1 > Result(J).Integer_1 then\n Swap(Result(I), Result(J));\n elsif Result(I).Integer_1 = Result(J).Integer_1 and then Result(I).Integer_2 < Result(J).Integer_2 then\n Swap(Result(I), Result(J));\n end if;\n end loop;\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:38:75: error: unrecognized attribute \"Empty\"\nprogram.ada:42:10: error: declarations mixed with statements is a GNAT-specific extension\nprogram.ada:42:10: error: incompatible with Ada version set at line 33\nprogram.ada:42:10: error: must use pragma Extensions_Allowed (All)\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_88_sort_array", "outcome": "compile_error", "completion": " is\n Result : Integer_Array := My_Array;\n Sum : Integer := My_Array (Result'First) + My_Array (Result'Last);\n begin\n if Sum mod 2 = 0 then\n for I in Result'Range loop\n for J in Result'First .. Result'Last - I loop\n if Result (J) < Result (J + 1) then\n Swap (Result (J), Result (J + 1));\n end if;\n end loop;\n end loop;\n else\n for I in Result'Range loop\n for J in Result'First .. Result'Last - I loop\n if Result (J) > Result (J + 1) then\n Swap (Result (J), Result (J + 1));\n end if;\n end loop;\n end loop;\n end if;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:13:19: error: \"Swap\" is undefined (more references follow)\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_89_encrypt", "outcome": "compile_error", "completion": " is\n Result : String := S;\n Shift : constant Integer := 4; -- 2 * 2, as per problem statement\n begin\n for I in 1 .. S'Length loop\n if S(I) >= 'a' and then S(I) <= 'z' then\n Result(I) := Character'Succ(Character'Mod(S(I), Character'Last - 'a') + Shift);\n elsif S(I) >= 'A' and then S(I) <= 'Z' then\n Result(I) := Character'Succ(Character'Mod(S(I), Character'Last - 'A') + Shift);\n end if;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:11:76: error: invalid operand types for operator \"-\"\nplaceholder.adb:11:76: error: left operand has type \"Standard.Character\"\nplaceholder.adb:11:76: error: right operand has a character type\nplaceholder.adb:13:76: error: invalid operand types for operator \"-\"\nplaceholder.adb:13:76: error: left operand has type \"Standard.Character\"\nplaceholder.adb:13:76: error: right operand has a character type\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_90_next_smallest", "outcome": "runtime_error", "completion": " is\n Min1, Min2 : Integer := Integer'Last;\n Found : Boolean := False;\n begin\n for I in Lst'Range loop\n if Lst(I) < Min1 then\n Min2 := Min1;\n Min1 := Lst(I);\n Found := True;\n elsif Lst(I) /= Min1 and then Lst(I) < Min2 then\n Min2 := Lst(I);\n Found := True;\n end if;\n end loop;\n if Found then\n return (Valid => True, Value => Min2);\n else\n return (Valid => False);\n end if;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:14\n[./main]\n0x40921f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403393 Main at main.adb:14\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f95f6720248\n0x7f95f6720303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_91_is_bored", "outcome": "compile_error", "completion": " is\n Count : Integer := 0;\n Start : Natural := S'First;\n Delimiters : constant String := \".?!\";\n begin\n for J in S'Range loop\n if Delimiters indexOf S(J) /= -1 then\n declare\n Sentence : String := S(Start .. J);\n begin\n if Sentence'Length > 2 and then Sentence(1 .. 2) = \"I \" then\n Count := Count + 1;\n end if;\n end;\n Start := J + 1;\n end if;\n end loop;\n return Count;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:25:23: error: binary operator expected\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_92_any_int", "outcome": "compile_error", "completion": " is\n A, B, C : Integer;\n begin\n if X = Float'Floor(X) and then Y = Float'Floor(Y) and then Z = Float'Floor(Z) then\n A := Integer(X);\n B := Integer(Y);\n C := Integer(Z);\n return (A = B + C) or else (B = A + C) or else (C = A + B);\n end if;\n return False;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:11:30: error: expected type \"Standard.Float\"\nmain.adb:11:30: error: found type universal integer\nmain.adb:12:35: error: expected type \"Standard.Float\"\nmain.adb:12:35: error: found type universal integer\nmain.adb:13:35: error: expected type \"Standard.Float\"\nmain.adb:13:35: error: found type universal integer\nmain.adb:14:30: error: expected type \"Standard.Float\"\nmain.adb:14:30: error: found type universal integer\nmain.adb:15:30: error: expected type \"Standard.Float\"\nmain.adb:15:30: error: found type universal integer\nmain.adb:17:30: error: expected type \"Standard.Float\"\nmain.adb:17:30: error: found type universal integer\nmain.adb:18:30: error: expected type \"Standard.Float\"\nmain.adb:18:30: error: found type universal integer\nmain.adb:19:30: error: expected type \"Standard.Float\"\nmain.adb:19:30: error: found type universal integer\nmain.adb:20:35: error: expected type \"Standard.Float\"\nmain.adb:20:35: error: found type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_93_encode", "outcome": "compile_error", "completion": " is\n function Swap_Case (C : Character) return Character is\n begin\n if C >= 'a' and then C <= 'z' then\n return Character'Succ(Character'Pred(C));\n elsif C >= 'A' and then C <= 'Z' then\n return Character'Pred(Character'Succ(C));\n else\n return C;\n end if;\n end Swap_Case;\n\n function Replace_Vowel (V : Character) return Character is\n begin\n case V is\n when 'a' => return 'c';\n when 'e' => return 'g';\n when 'i' => return 'k';\n when 'o' => return 'q';\n when 'u' => return 'w';\n when 'A' => return 'C';\n when 'E' => return 'G';\n when 'I' => return 'K';\n when 'O' => return 'Q';\n when 'U' => return 'W';\n when others => return V;\n end case;\n end Replace_Vowel;\n\n Result : String := Message;\n begin\n for I in 1 .. Length(Result) loop\n Result(I) := Replace_Vowel(Swap_Case(Result(I)));\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:36:21: error: \"Length\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_94_skjkasdkd", "outcome": "pass", "completion": " is\n function Is_Prime (N : Integer) return Boolean is\n D : Integer := 2;\n begin\n if N <= 1 then\n return False;\n end if;\n while D * D <= N loop\n if N mod D = 0 then\n return False;\n end if;\n D := D + 1;\n end loop;\n return True;\n end Is_Prime;\n\n Max_Prime : Integer := -1;\n begin\n for I in Lst'Range loop\n if Is_Prime(Lst(I)) and then Lst(I) > Max_Prime then\n Max_Prime := Lst(I);\n end if;\n end loop;\n if Max_Prime = -1 then\n return 0; -- No prime numbers found\n else\n declare\n Sum : Integer := 0;\n begin\n while Max_Prime /= 0 loop\n Sum := Sum + Max_Prime mod 10;\n Max_Prime := Max_Prime / 10;\n end loop;\n return Sum;\n end;\n end if;", "log": ""} +{"name": "HumanEval_95_check_dict_case", "outcome": "compile_error", "completion": " is\n Lower_Case_Count : Natural := 0;\n Upper_Case_Count : Natural := 0;\n Total_Count : Natural := Dict.Length;\n begin\n for Key of Dict loop\n if Key'Length > 0 then\n if Key(1) >= 'a' and then Key(1) <= 'z' then\n Lower_Case_Count := Lower_Case_Count + 1;\n elsif Key(1) >= 'A' and then Key(1) <= 'Z' then\n Upper_Case_Count := Upper_Case_Count + 1;\n end if;\n end if;\n end loop;\n \n if Total_Count = 0 then\n return False;\n elsif Lower_Case_Count = Total_Count or else Upper_Case_Count = Total_Count then\n return True;\n else\n return False;\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:9:36: error: expected type \"Standard.Integer\"\nplaceholder.adb:9:36: error: found type \"Ada.Containers.Count_Type\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_96_count_up_to", "outcome": "pass", "completion": " is\n function Is_Prime (X : Integer) return Boolean is\n I : Positive := 2;\n begin\n if X <= 1 then\n return False;\n end if;\n while I * I <= X loop\n if X mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;\n end Is_Prime;\n\n Result : Integer_Array(1..N);\n Index : Natural := 0;\n begin\n for I in 2 .. N - 1 loop\n if Is_Prime(I) then\n Index := Index + 1;\n Result(Index) := I;\n end if;\n end loop;\n return Result(1..Index);", "log": ""} +{"name": "HumanEval_97_multiply", "outcome": "pass", "completion": " is\n Unit_A : Integer := A mod 10;\n Unit_B : Integer := B mod 10;\n begin\n return Unit_A * Unit_B;", "log": ""} +{"name": "HumanEval_98_count_upper", "outcome": "compile_error", "completion": " is\n Cnt : Integer := 0;\n begin\n for I in S'Range loop\n if I mod 2 = 0 and then S(I) in 'A' .. 'Z' and then S(I) in \"AEIOU\" then\n Cnt := Cnt + 1;\n end if;\n end loop;\n return Cnt;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:9:70: error: subtype mark required in this context\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_99_closest_integer", "outcome": "compile_error", "completion": " is\n Number : Float := Float'Value(Value);\n begin\n if Number < 0 then\n return Integer(Number - 0.5);\n else\n return Integer(Number + 0.5);\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:8:17: error: invalid operand types for operator \"<\"\nplaceholder.adb:8:17: error: left operand has type \"Standard.Float\"\nplaceholder.adb:8:17: error: right operand has type universal integer\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_100_make_a_pile", "outcome": "pass", "completion": " is\n Result : Integer_Array(1..N);\n Current_Stones : Integer := N;\n begin\n for I in 1..N loop\n Result(I) := Current_Stones;\n if N mod 2 = 0 then\n Current_Stones := Current_Stones + 2; -- Next even number\n else\n Current_Stones := Current_Stones + 2; -- Next odd number\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_101_words_string", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array := Unbounded_String_Array'Empty;\n Start : Natural := S'First;\n I : Natural := S'First;\n begin\n while I <= S'Last loop\n if S(I) = ' ' or else S(I) = ',' then\n if Start <= I - 1 then\n Result := Result & To_Unbounded_String(S(Start .. I - 1));\n end if;\n Start := I + 1;\n end if;\n I := I + 1;\n end loop;\n if Start <= S'Last then\n Result := Result & To_Unbounded_String(S(Start .. S'Last));\n end if;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:22:65: error: unrecognized attribute \"Empty\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_102_choose_num", "outcome": "pass", "completion": " is\n Result : Integer := -1;\n begin\n if X > Y then\n return Result;\n end if;\n \n for I in reverse X .. Y loop\n if I mod 2 = 0 then\n Result := I;\n exit;\n end if;\n end loop;\n \n return Result;", "log": ""} +{"name": "HumanEval_104_unique_digits", "outcome": "compile_error", "completion": " is\n Result : Integer_Array := (others => 0);\n Count : Natural := 0;\n begin\n for I in X'Range loop\n declare\n Num : Integer := X(I);\n Has_Even : Boolean := False;\n begin\n while Num /= 0 loop\n if (Num mod 10) mod 2 = 0 then\n Has_Even := True;\n exit;\n end if;\n Num := Num / 10;\n end loop;\n if not Has_Even then\n Count := Count + 1;\n Result(Count) := X(I);\n end if;\n end;\n end loop;\n -- Sort the result array\n for I in 1 .. Count - 1 loop\n for J in I + 1 .. Count loop\n if Result(I) > Result(J) then\n declare\n Temp : Integer := Result(I);\n begin\n Result(I) := Result(J);\n Result(J) := Temp;\n end;\n end if;\n end loop;\n end loop;\n -- Resize the result array to remove unused space\n return Result(1 .. Count);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:6:34: error: \"others\" choice not allowed here\nplaceholder.adb:6:34: error: qualify the aggregate with a constrained subtype to provide bounds for it\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_105_by_length", "outcome": "compile_error", "completion": " is\n Valid_Numbers : constant Integer_Array := (1 .. 9 => <>);\n Result : Unbounded_String_Array(Arr'Range);\n Count : Natural := Arr'First;\n begin\n for I in Arr'Range loop\n if Arr(I) >= 1 and Arr(I) <= 9 then\n Valid_Numbers(Count) := Arr(I);\n Count := Count + 1;\n end if;\n end loop;\n \n for J in reverse Valid_Numbers'Range loop\n case Valid_Numbers(J) is\n when 1 => Result(J) := To_Unbounded_String(\"One\");\n when 2 => Result(J) := To_Unbounded_String(\"Two\");\n when 3 => Result(J) := To_Unbounded_String(\"Three\");\n when 4 => Result(J) := To_Unbounded_String(\"Four\");\n when 5 => Result(J) := To_Unbounded_String(\"Five\");\n when 6 => Result(J) := To_Unbounded_String(\"Six\");\n when 7 => Result(J) := To_Unbounded_String(\"Seven\");\n when 8 => Result(J) := To_Unbounded_String(\"Eight\");\n when 9 => Result(J) := To_Unbounded_String(\"Nine\");\n when others => null;\n end case;\n end loop;\n \n return Result(1 .. Count - 1);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:13:13: error: left hand side of assignment must be a variable\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_106_f", "outcome": "pass", "completion": " is\n Result : Integer_Array (1 .. N);\n function Factorial (I : Positive) return Integer is\n Fact : Integer := 1;\n begin\n for J in 1 .. I loop\n Fact := Fact * J;\n end loop;\n return Fact;\n end Factorial;\n function Sum (I : Positive) return Integer is\n Summation : Integer := 0;\n begin\n for J in 1 .. I loop\n Summation := Summation + J;\n end loop;\n return Summation;\n end Sum;\n begin\n for I in 1 .. N loop\n if I mod 2 = 0 then\n Result(I) := Factorial(I);\n else\n Result(I) := Sum(I);\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_107_even_odd_palindrome", "outcome": "runtime_error", "completion": " is\n Result : Integer_Integer_Tuple := (0, 0);\n Is_Palindrome : Boolean;\n I : Integer;\n begin\n for I in 1 .. N loop\n Is_Palindrome := True;\n declare\n S : String := Integer'Image(I);\n J : Natural := S'First;\n K : Natural := S'Last;\n begin\n while J < K loop\n if S(J) /= S(K) then\n Is_Palindrome := False;\n exit;\n end if;\n J := J + 1;\n K := K - 1;\n end loop;\n end;\n if Is_Palindrome then\n if I mod 2 = 0 then\n Result.Integer_1 := Result.Integer_1 + 1;\n else\n Result.Integer_2 := Result.Integer_2 + 1;\n end if;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x4090df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4031bf Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fec595b2248\n0x7fec595b2303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_108_count_nums", "outcome": "compile_error", "completion": " is\n function Sum_Digits (N : Integer) return Integer is\n Sum : Integer := 0;\n Is_Negative : Boolean := N < 0;\n begin\n if Is_Negative then\n N := -N;\n end if;\n while N /= 0 loop\n Sum := Sum + (N mod 10);\n N := N / 10;\n end loop;\n if Is_Negative then\n Sum := -Sum;\n end if;\n return Sum;\n end Sum_Digits;\n begin\n return (Integer'Count (for all X in Arr => Sum_Digits (X) > 0));", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:11:13: error: assignment to \"in\" mode parameter not allowed\nplaceholder.adb:15:13: error: assignment to \"in\" mode parameter not allowed\nplaceholder.adb:23:38: error: missing Range attribute in iteration over an array\nplaceholder.adb:23:38: error: if \"X\" is meant to designate an element of the array, use \"of\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_109_move_one_ball", "outcome": "compile_error", "completion": " is\n procedure Swap (I, J : Positive);\n pragma Inline (Swap);\n\n procedure Swap (I, J : Positive) is\n Temp : Integer := Arr(I);\n begin\n Arr(I) := Arr(J);\n Arr(J) := Temp;\n end Swap;\n\n function Is_Sorted return Boolean;\n pragma Inline (Is_Sorted);\n\n function Is_Sorted return Boolean is\n begin\n for I in Arr'Range loop\n if I /= Arr'Last and then Arr(I) > Arr(I + 1) then\n return False;\n end if;\n end loop;\n return True;\n end Is_Sorted;\n\n Shifted : Integer_Array := Arr;\n Shift_Count : Natural := 0;\n begin\n if Arr'Length = 0 then\n return True;\n end if;\n\n while not Is_Sorted and Shift_Count < Arr'Length loop\n Swap(Shifted'First, Shifted'Last);\n Shifted := Shifted(Shifted'First .. Shifted'Last - 1 & Shifted'First);\n Shift_Count := Shift_Count + 1;\n end loop;\n\n return Is_Sorted;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:12:10: error: assignment to \"in\" mode parameter not allowed\nplaceholder.adb:13:10: error: assignment to \"in\" mode parameter not allowed\nplaceholder.adb:38:43: error: incompatible types in range\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_110_exchange", "outcome": "pass", "completion": " is\n Odd_Count_Lst1 : Natural := 0;\n Even_Count_Lst2 : Natural := 0;\n begin\n for I in Lst1'Range loop\n if Lst1(I) mod 2 /= 0 then\n Odd_Count_Lst1 := Odd_Count_Lst1 + 1;\n end if;\n end loop;\n \n for J in Lst2'Range loop\n if Lst2(J) mod 2 = 0 then\n Even_Count_Lst2 := Even_Count_Lst2 + 1;\n end if;\n end loop;\n \n if Odd_Count_Lst1 <= Even_Count_Lst2 then\n return \"YES\";\n else\n return \"NO\";\n end if;", "log": ""} +{"name": "HumanEval_111_histogram", "outcome": "runtime_error", "completion": " is\n Result : String_Integer_Dict.Map;\n Count : Integer := 0;\n Temp : String := \"\";\n begin\n for I in Test'Range loop\n if Test(I) = ' ' then\n if Temp /= \"\" then\n if not Result.Contains(Temp) or else Result(Temp) < Count then\n Result.Delete(Temp);\n Result.Insert(Temp, Count);\n end if;\n Count := 0;\n Temp := \"\";\n end if;\n else\n Count := Count + 1;\n Temp := Temp & Test(I);\n end if;\n end loop;\n if Temp /= \"\" then\n if not Result.Contains(Temp) or else Result(Temp) < Count then\n Result.Delete(Temp);\n Result.Insert(Temp, Count);\n end if;\n end if;\n return Result;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:23 range check failed\n[./main]\n0x4106cc Placeholder.Histogram at placeholder.adb:23\n0x410d0b Main at main.adb:13\n0x40341d Main at b~main.adb:261\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7ff1c7446248\n0x7ff1c7446303\n[./main]\n0x402e3f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_112_reverse_delete", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String := To_Unbounded_String(\"\");\n Is_Palindrome : Boolean := True;\n begin\n -- Delete characters from S that are in C\n for I in 1 .. Length(S) loop\n if not Contains(C, Element(S, I)) then\n Append(Result, Element(S, I));\n end if;\n end loop;\n\n -- Check if the result string is a palindrome\n for J in 1 .. Length(Result) / 2 loop\n if Element(Result, J) /= Element(Result, Length(Result) - J + 1) then\n Is_Palindrome := False;\n exit;\n end if;\n end loop;\n\n return (Result, Is_Palindrome);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:16:43: error: expected private type \"Ada.Strings.Unbounded.Unbounded_String\"\nmain.adb:16:43: error: found a string type\nmain.adb:20:49: error: expected private type \"Ada.Strings.Unbounded.Unbounded_String\"\nmain.adb:20:49: error: found a string type\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_113_odd_count", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array(Lst'Range);\n Count_Odd : Natural;\n begin\n for I in Lst'Range loop\n Count_Odd := 0;\n for J in 1..Length(Lst(I)) loop\n if Character'Value(Element(Lst(I), J)) mod 2 /= 0 then\n Count_Odd := Count_Odd + 1;\n end if;\n end loop;\n Result(I) := To_Unbounded_String(\"the number of odd elements \") & \n To_Unbounded_String(Count_Odd'Image) &\n To_Unbounded_String(\"n the str\") &\n To_Unbounded_String(Count_Odd'Image) &\n To_Unbounded_String(\"ng \") &\n To_Unbounded_String(Count_Odd'Image) &\n To_Unbounded_String(\" of the \") &\n To_Unbounded_String(Count_Odd'Image) &\n To_Unbounded_String(\"nput.\");\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:13:52: error: invalid operand types for operator \"Mod\"\nplaceholder.adb:13:52: error: left operand has type \"Standard.Character\"\nplaceholder.adb:13:52: error: right operand has type universal integer\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_114_minSubArraySum", "outcome": "compile_error", "completion": " is\n Min_Sum, Current_Sum : Integer := Nums(1);\n begin\n for I in 2 .. Nums'Last loop\n Current_Sum := Integer'Min(Nums(I), Current_Sum + Nums(I));\n Min_Sum := Integer'Min(Min_Sum, Current_Sum);\n end loop;\n return Min_Sum;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:14:31: error: value not in range of type \"Standard.Integer\"\nmain.adb:14:31: error: static expression fails Constraint_Check\nmain.adb:14:53: error: value not in range of type \"Standard.Integer\"\nmain.adb:14:53: error: static expression fails Constraint_Check\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_115_max_fill", "outcome": "compile_error", "completion": " is\n Total_Water : Integer := 0;\n Buckets_Needed : Integer := 0;\n begin\n for Well of Grid loop\n Total_Water := Total_Water + Well.Length;\n end loop;\n Buckets_Needed := (Total_Water + Capacity - 1) / Capacity;\n return Buckets_Needed;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:11:37: error: invalid operand types for operator \"+\"\nplaceholder.adb:11:37: error: left operand has type \"Standard.Integer\"\nplaceholder.adb:11:37: error: right operand has type \"Ada.Containers.Count_Type\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_116_sort_array", "outcome": "compile_error", "completion": " is\n function Count_Ones (N : Integer) return Natural is\n Cnt : Natural := 0;\n begin\n for I in 0 .. 31 loop\n if (N and (1 shl I)) /= 0 then\n Cnt := Cnt + 1;\n end if;\n end loop;\n return Cnt;\n end Count_Ones;\n\n procedure Swap (A, B : in out Integer) is\n Temp : Integer;\n begin\n Temp := A;\n A := B;\n B := Temp;\n end Swap;\n\n procedure Quick_Sort (L, R : Positive) is\n Pivot : Integer := Arr(L);\n Left : Positive := L;\n Right : Positive := R;\n begin\n while Left <= Right loop\n while Count_Ones(Arr(Left)) < Count_Ones(Pivot) or else\n (Count_Ones(Arr(Left)) = Count_Ones(Pivot) and then Arr(Left) < Pivot) loop\n Left := Left + 1;\n end loop;\n while Count_Ones(Arr(Right)) > Count_Ones(Pivot) or else\n (Count_Ones(Arr(Right)) = Count_Ones(Pivot) and then Arr(Right) > Pivot) loop\n Right := Right - 1;\n end loop;\n if Left <= Right then\n Swap(Arr(Left), Arr(Right));\n Left := Left + 1;\n Right := Right - 1;\n end if;\n end loop;\n if L < Right then\n Quick_Sort(L, Right);\n end if;\n if Left < R then\n Quick_Sort(Left, R);\n end if;\n end Quick_Sort;\n\n begin\n Quick_Sort(1, Arr'Last);\n return Arr;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:27:25: error: binary operator expected\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_117_select_words", "outcome": "compile_error", "completion": " is\n Words : constant Unbounded_String_Array := Split (To_Unbounded_String (S), ' ');\n Result : Unbounded_String_Array (1 .. 0);\n Consonant_Count : Natural;\n begin\n for I in Words'Range loop\n Consonant_Count := 0;\n for J in 1 .. Length (Words(I)) loop\n if not Is_Vowel (Words(I)(J)) then\n Consonant_Count := Consonant_Count + 1;\n end if;\n end loop;\n if Consonant_Count = N then\n Result := Result & Words(I);\n end if;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:7:50: error: \"Split\" is undefined\nplaceholder.adb:14:20: error: \"Is_Vowel\" is undefined\nplaceholder.adb:14:30: error: array type required in indexed component\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_118_get_closest_vowel", "outcome": "compile_error", "completion": " is\n Vowels : constant String := \"aeiouAEIOU\";\n Result : String := \"\";\n Found : Boolean := False;\n begin\n for I in reverse Word'Range loop\n if Vowels indexOf Word(I) /= -1 then\n if I > Word'First + 1 and then I < Word'Last then\n if Vowels indexOf Word(I-1) = -1 and then Vowels indexOf Word(I+1) = -1 then\n Result := Word(I);\n Found := True;\n exit;\n end if;\n end if;\n end if;\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:31:19: error: binary operator expected\nprogram.ada:33:25: error: binary operator expected\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_119_match_parens", "outcome": "compile_error", "completion": " is\n function Is_Balanced (S : Unbounded_String) return Boolean is\n Count : Integer := 0;\n begin\n for C of S loop\n if C = '(' then\n Count := Count + 1;\n elsif C = ')' then\n Count := Count - 1;\n if Count < 0 then\n return False;\n end if;\n end if;\n end loop;\n return Count = 0;\n end Is_Balanced;\n\n Str1, Str2 : Unbounded_String;\n begin\n Str1 := Lst(1);\n Str2 := Lst(2);\n\n if Is_Balanced(Str1 & Str2) or else Is_Balanced(Str2 & Str1) then\n return \"Yes\";\n else\n return \"No\";\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:10:14: error: cannot iterate over \"Unbounded_String\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_120_maximum", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. K);\n Temp : Integer_Array := Arr;\n begin\n if K = 0 then\n return Result;\n end if;\n \n for I in 1 .. K loop\n declare\n Max_Index : Positive := 1;\n Max_Value : Integer := Temp(1);\n begin\n for J in 2 .. Temp'Length loop\n if Temp(J) > Max_Value then\n Max_Value := Temp(J);\n Max_Index := J;\n end if;\n end loop;\n \n Result(I) := Max_Value;\n Temp(Max_Index) := Integer'Min(Integer'Last, Temp(Temp'First));\n end;\n end loop;\n \n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x409fdf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4034eb Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f5ba71f1248\n0x7f5ba71f1303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_121_solution", "outcome": "runtime_error", "completion": " is\n Sum : Integer := 0;\n begin\n for I in Lst'Range loop\n if I mod 2 = 0 and then Lst(I) mod 2 /= 0 then\n Sum := Sum + Lst(I);\n end if;\n end loop;\n return Sum;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408f5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403054 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f835e42d248\n0x7f835e42d303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_122_add_elements", "outcome": "pass", "completion": " is\n Sum : Integer := 0;\n begin\n for I in 1 .. K loop\n if Arr(I) >= -99 and Arr(I) <= 99 then\n Sum := Sum + Arr(I);\n end if;\n end loop;\n return Sum;", "log": ""} +{"name": "HumanEval_123_get_odd_collatz", "outcome": "compile_error", "completion": " is\n procedure Add_Odd (V : in out Integer_Array; X : Integer) is\n pragma Assert (X mod 2 = 1);\n begin\n V := V & X;\n end Add_Odd;\n\n procedure Collatz (N : in out Integer) is\n begin\n while N /= 1 loop\n if N mod 2 = 0 then\n N := N / 2;\n else\n Add_Odd (Result, N);\n N := 3 * N + 1;\n end if;\n end loop;\n Add_Odd (Result, N); -- Add 1 to the result\n end Collatz;\n\n Result : Integer_Array := Integer_Array'();\n begin\n Collatz (N);\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:45:48: error: missing operand\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_124_valid_date", "outcome": "compile_error", "completion": " is\n MM, DD, YYYY : Integer := 0;\n Date_Split : array (1..3) of String(1..2);\n begin\n -- Check if the date string is not empty\n if Date'Length = 0 then\n return False;\n end if;\n\n -- Split the date string into month, day, and year\n Date_Split(1) := Date(1..2);\n Date_Split(2) := Date(4..5);\n Date_Split(3) := Date(7..10);\n\n -- Convert the split strings to integers\n MM := Integer'Value(Date_Split(1));\n DD := Integer'Value(Date_Split(2));\n YYYY := Integer'Value(Date_Split(3));\n\n -- Validate the month\n if MM < 1 or MM > 12 then\n return False;\n end if;\n\n -- Validate the day based on the month\n case MM is\n when 1 | 3 | 5 | 7 | 8 | 10 | 12 =>\n if DD < 1 or DD > 31 then\n return False;\n end if;\n when 4 | 6 | 9 | 11 =>\n if DD < 1 or DD > 30 then\n return False;\n end if;\n when 2 =>\n if DD < 1 or DD > 29 then\n return False;\n end if;\n end case;\n\n -- If all checks pass, the date is valid\n return True;\n exception\n when others =>\n -- Return False if any conversion fails\n return False;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:15:29: warning: index for \"Date\" may assume lower bound of 1 [-gnatww]\nplaceholder.adb:15:29: warning: suggested replacement: \"Date'First\" [-gnatww]\nplaceholder.adb:15:32: warning: index for \"Date\" may assume lower bound of 1 [-gnatww]\nplaceholder.adb:15:32: warning: suggested replacement: \"Date'First + 1\" [-gnatww]\nplaceholder.adb:16:29: warning: index for \"Date\" may assume lower bound of 1 [-gnatww]\nplaceholder.adb:16:29: warning: suggested replacement: \"Date'First + 3\" [-gnatww]\nplaceholder.adb:16:32: warning: index for \"Date\" may assume lower bound of 1 [-gnatww]\nplaceholder.adb:16:32: warning: suggested replacement: \"Date'First + 4\" [-gnatww]\nplaceholder.adb:17:24: warning: too many elements for subtype of \"Standard.String\" defined at line 7 [enabled by default]\nplaceholder.adb:17:24: warning: expected 2 elements; found 4 elements [enabled by default]\nplaceholder.adb:17:24: warning: Constraint_Error will be raised at run time [enabled by default]\nplaceholder.adb:17:29: warning: index for \"Date\" may assume lower bound of 1 [-gnatww]\nplaceholder.adb:17:29: warning: suggested replacement: \"Date'First + 6\" [-gnatww]\nplaceholder.adb:17:32: warning: index for \"Date\" may assume lower bound of 1 [-gnatww]\nplaceholder.adb:17:32: warning: suggested replacement: \"Date'First + 9\" [-gnatww]\nplaceholder.adb:30:07: error: missing case values: -16#8000_0000# .. 0\nplaceholder.adb:30:07: error: missing case values: 13 .. 16#7FFF_FFFF#\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_126_is_sorted", "outcome": "runtime_error", "completion": " is\n Last : Integer := Lst(1);\n begin\n for I in 2 .. Lst'Last loop\n if Lst(I) <= Last then\n return False;\n end if;\n Last := Lst(I);\n end loop;\n return True;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:6:25 index check failed\nindex 1 not in 1..0\n[./main]\n0x402f9f Placeholder.Is_Sorted at placeholder.adb:6\n0x4032f8 Main at main.adb:17\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fdb11b80248\n0x7fdb11b80303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_127_intersection", "outcome": "compile_error", "completion": " is\n begin\n if Interval1.Integer_2 < Interval2.Integer_1 or Interval2.Integer_2 < Interval1.Integer_1 then\n return \"NO\";\n else\n declare\n Start : constant Integer := Integer'Max(Interval1.Integer_1, Interval2.Integer_1);\n End_ : constant Integer := Integer'Min(Interval1.Integer_2, Interval2.Integer_2);\n Length : constant Integer := End_ - Start + 1;\n begin\n if Length <= 1 then\n return \"NO\";\n else\n for I in 2 .. Length / 2 loop\n if Length mod I = 0 then\n return \"NO\";\n end if;\n end loop;\n return \"YES\";\n end if;\n end;\n end if;\n end Intersection;\nend Placeholder;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\nprogram.ada:42:19: error: identifier cannot end with underline\nprogram.ada:43:48: error: identifier cannot end with underline\nprogram.ada:59:04: error: compilation unit expected\nprogram.ada:64:01: error: misplaced \"with\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_128_prod_signs", "outcome": "compile_error", "completion": " is\n Sum_Magnitudes : Integer := 0;\n Product_Signs : Integer := 1;\n Empty : constant Boolean := Arr'Length = 0;\n begin\n if Empty then\n return (Valid => False);\n else\n for I in Arr'Range loop\n Sum_Magnitudes := Sum_Magnitudes + abs(Arr(I));\n if Arr(I) /= 0 then\n Product_Signs := Product_Signs * signum(Arr(I));\n end if;\n end loop;\n return (Valid => True, Value => Sum_Magnitudes * Product_Signs);\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:16:49: error: \"signum\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_129_minPath", "outcome": "compile_error", "completion": " is\n -- Implementation goes here", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:42:03: error: missing \"begin\" for function \"Min_Path\" at line 40\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_130_tri", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. N + 1);\n begin\n Result (1) := 3;\n for I in 2 .. N + 1 loop\n if I mod 2 = 0 then\n Result (I) := 1 + I / 2;\n else\n Result (I) := Result (I - 1) + Result (I - 2) + Result (I + 1);\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x409b1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033e1 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f3981bb9248\n0x7f3981bb9303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_131_digits", "outcome": "compile_error", "completion": " is\n Product : Integer := 1;\n Odd_Found : Boolean := False;\n Digit : Integer;\n begin\n while N > 0 loop\n Digit := N mod 10;\n if Digit mod 2 /= 0 then\n Product := Product * Digit;\n Odd_Found := True;\n end if;\n N := N / 10;\n end loop;\n if not Odd_Found then\n return 0;\n else\n return Product;\n end if;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:4:13: error: reserved word \"digits\" cannot be used as identifier\nprogram.ada:38:04: error: \"end Digits;\" expected\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_132_is_nested", "outcome": "runtime_error", "completion": " is\n Depth : Natural := 0;\n Nested : Boolean := False;\n begin\n for C of My_String loop\n if C = '[' then\n Depth := Depth + 1;\n if Depth > 1 then\n Nested := True;\n end if;\n elsif C = ']' then\n Depth := Depth - 1;\n if Depth < 0 then\n return False; -- Invalid sequence\n end if;\n end if;\n end loop;\n return Nested and then Depth = 0;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:16:28 range check failed\nvalue -1 not in 0..2147483647\n[./main]\n0x402ffd Placeholder.Is_Nested at placeholder.adb:16\n0x4030a3 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f404c1f1248\n0x7f404c1f1303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_133_sum_squares", "outcome": "compile_error", "completion": " is\n Result : Integer := 0;\n begin\n for X of Lst loop\n Result := Result + Integer(Round(X * X));\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:9:37: error: \"Round\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_134_check_if_last_char_is_a_letter", "outcome": "pass", "completion": " is\n Last_Char : Character;\n Is_Letter : Boolean := False;\n begin\n if Txt'Length = 0 then\n return False;\n end if;\n\n Last_Char := Txt(Txt'Last);\n\n if Last_Char in 'A' .. 'Z' or else Last_Char in 'a' .. 'z' then\n Is_Letter := True;\n end if;\n\n if Is_Letter and then (Txt'Length = 1 or else Txt(Txt'Last - 1) = ' ') then\n return True;\n else\n return False;\n end if;", "log": ""} +{"name": "HumanEval_135_can_arrange", "outcome": "runtime_error", "completion": " is\n Last_Index : Integer := Arr'Last;\n begin\n for I in reverse Arr'Range loop\n if I > 1 and then Arr(I) < Arr(I - 1) then\n Last_Index := I;\n exit;\n end if;\n end loop;\n return Last_Index;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408edf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403097 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f845c317248\n0x7f845c317303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_136_largest_smallest_integers", "outcome": "pass", "completion": " is\n Negative_Max : Integer_Option := (Valid => False);\n Positive_Min : Integer_Option := (Valid => False);\n begin\n for I of Lst loop\n if I < 0 then\n if not Negative_Max.Valid or else I > Negative_Max.Value then\n Negative_Max := (Valid => True, Value => I);\n end if;\n elsif I > 0 then\n if not Positive_Min.Valid or else I < Positive_Min.Value then\n Positive_Min := (Valid => True, Value => I);\n end if;\n end if;\n end loop;\n return (Negative_Max, Positive_Min);", "log": ""} +{"name": "HumanEval_138_is_equal_to_sum_even", "outcome": "runtime_error", "completion": " is\n Sum : Integer := 0;\n begin\n if N < 8 then\n return False;\n end if;\n \n for I in 1 .. 3 loop\n Sum := Sum + 2 * I;\n end loop;\n \n return (N - Sum) mod 2 = 0 and N >= Sum;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x408e5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403074 Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f34d71e2248\n0x7f34d71e2303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_139_special_factorial", "outcome": "compile_error", "completion": " is\n Result : Integer := 1;\n Factorial : Integer := 1;\n begin\n for I in 1 .. N loop\n Factorial := Factorial * I;\n Result := Result * Factorial;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:13:35: error: value not in range of type \"Standard.Integer\"\nmain.adb:13:35: error: static expression fails Constraint_Check\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_140_fix_spaces", "outcome": "runtime_error", "completion": " is\n Result : String := Text;\n Count : Natural := 0;\n begin\n for I in 1 .. Text'Length loop\n if Text(I) = ' ' then\n Count := Count + 1;\n if Count > 2 then\n Result(I) := '-';\n else\n Result(I) := '_';\n end if;\n else\n Count := 0;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:14\n[./main]\n0x40955f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4035b8 Main at main.adb:14\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f0a2ab4a248\n0x7f0a2ab4a303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_141_file_name_check", "outcome": "compile_error", "completion": " is\n Digits_Count : Natural := 0;\n Dot_Position : Natural := 0;\n Valid_Extensions : constant array (Positive range <>) of String := (\"txt\", \"exe\", \"dll\");\n Extension_Start : Natural := 0;\n Extension_End : Natural := 0;\n begin\n for I in File_Name'Range loop\n if File_Name(I) = '.' then\n Dot_Position := I;\n elsif File_Name(I) >= '0' and File_Name(I) <= '9' then\n Digits_Count := Digits_Count + 1;\n end if;\n end loop;\n\n if Dot_Position = 0 or else Dot_Position = File_Name'First or else Dot_Position = File_Name'Last then\n return \"No\";\n end if;\n\n if Digits_Count > 3 then\n return \"No\";\n end if;\n\n if File_Name(File_Name'First) not in 'a'..'z' | 'A'..'Z' then\n return \"No\";\n end if;\n\n Extension_Start := Dot_Position + 1;\n Extension_End := File_Name'Last;\n\n for J in Positive range Valid_Extensions'Range loop\n if File_Name(Extension_Start..Extension_End) = Valid_Extensions(J) then\n return \"Yes\";\n end if;\n end loop;\n\n return \"No\";", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:8:64: error: unconstrained element type in array declaration\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_142_sum_squares", "outcome": "runtime_error", "completion": " is\n Result : Integer := 0;\n begin\n for I in Lst'Range loop\n if I mod 3 = 0 then\n Result := Result + Lst(I) ** 2;\n elsif I mod 4 = 0 then\n Result := Result + Lst(I) ** 3;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40925f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403158 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fc43f50f248\n0x7fc43f50f303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_143_words_in_sentence", "outcome": "runtime_error", "completion": " is\n function Is_Prime (N : Natural) return Boolean is\n I : Natural := 2;\n begin\n if N < 2 then\n return False;\n end if;\n while I * I <= N loop\n if N mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;\n end Is_Prime;\n\n Result : String(1..Sentence'Length);\n Last : Natural := 1;\n Word_Start : Natural := 1;\n begin\n for I in Sentence'Range loop\n if Sentence(I) = ' ' then\n declare\n Length : Natural := I - Word_Start;\n begin\n if Is_Prime(Length) then\n Result(Last .. Last + Length - 1) := Sentence(Word_Start .. I - 1);\n Last := Last + Length;\n end if;\n Word_Start := I + 1;\n end;\n end if;\n end loop;\n declare\n Length : Natural := Sentence'Last - Word_Start + 1;\n begin\n if Is_Prime(Length) then\n Result(Last .. Last + Length - 1) := Sentence(Word_Start .. Sentence'Last);\n Last := Last + Length;\n end if;\n end;\n return Result(1 .. Last - 1);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x409a9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4036ed Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fd84c4a8248\n0x7fd84c4a8303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_144_simplify", "outcome": "compile_error", "completion": " is\n function Parse_Fraction (Frac : String) return Integer is\n Slash_Pos : Natural := Frac'Index ('/');\n Numerator : Integer := Integer'Value(Frac(1 .. Slash_Pos - 1));\n Denominator : Integer := Integer'Value(Frac(Slash_Pos + 1 .. Frac'Last));\n begin\n return Numerator / Denominator;\n end Parse_Fraction;\n\n X_Value : Integer := Parse_Fraction(X);\n N_Value : Integer := Parse_Fraction(N);\n\n begin\n return (X_Value * N_Value) mod 1 = 0;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:7:45: error: unexpected argument for \"Index\" attribute\nplaceholder.adb:8:52: warning: index for \"Frac\" may assume lower bound of 1 [-gnatww]\nplaceholder.adb:8:52: warning: suggested replacement: \"Frac'First\" [-gnatww]\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_145_order_by_points", "outcome": "compile_error", "completion": " is\n type Pointed_Integer is record\n Value : Integer;\n Index : Positive;\n Points : Natural;\n end record;\n type Pointed_Integer_Array is array (Positive range <>) of Pointed_Integer;\n function Sum_Of_Digits (N : Integer) return Natural is\n Result : Natural := 0;\n Abs_N : Integer := abs N;\n begin\n while Abs_N > 0 loop\n Result := Result + Abs_N mod 10;\n Abs_N := Abs_N / 10;\n end loop;\n return Result;\n end Sum_Of_Digits;\n procedure Sort_By_Points (A : in out Pointed_Integer_Array) is\n procedure Swap (I, J : in Positive) is\n Temp : Pointed_Integer := A(I);\n begin\n A(I) := A(J);\n A(J) := Temp;\n end Swap;\n procedure Quick_Sort (Left, Right : in Positive) is\n Pivot : Positive := Left;\n I, J : Positive;\n begin\n I := Left;\n J := Right;\n loop\n exit when I >= J;\n loop\n exit when A(I).Points <= A(Pivot).Points or else (A(I).Points = A(Pivot).Points and then A(I).Index < A(Pivot).Index);\n I := I + 1;\n end loop;\n loop\n exit when A(J).Points >= A(Pivot).Points or else (A(J).Points = A(Pivot).Points and then A(J).Index > A(Pivot).Index);\n J := J - 1;\n end loop;\n if I < J then\n Swap(I, J);\n end if;\n end loop;\n Swap(Pivot, J);\n if Left < J - 1 then\n Quick_Sort(Left, J - 1);\n end if;\n if J + 1 < Right then\n Quick_Sort(J + 1, Right);\n end if;\n end Quick_Sort;\n begin\n Quick_Sort(1, A'Last);\n end Sort_By_Points;\n begin\n if Nums'Length = 0 then\n return Nums;\n end if;\n declare\n Pointed_Nums : Pointed_Integer_Array(1 .. Nums'Length);\n begin\n for I in Nums'", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:83:23: error: \"'\" should be \";\"\nprogram.ada:84:03: error: statement expected\nprogram.ada:84:03: error: missing \"end loop;\" for \"loop\" at line 83\nprogram.ada:84:03: error: missing \"end;\" for \"begin\" at line 82\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_146_specialFilter", "outcome": "pass", "completion": " is\n Count : Integer := 0;\n begin\n for N of Nums loop\n if N > 10 then\n declare\n First_Digit : Integer := abs(N);\n Last_Digit : Integer := abs(N mod 10);\n begin\n while First_Digit >= 10 loop\n First_Digit := First_Digit / 10;\n end loop;\n if First_Digit mod 2 = 1 and Last_Digit mod 2 = 1 then\n Count := Count + 1;\n end if;\n end;\n end if;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_147_get_max_triples", "outcome": "pass", "completion": " is\n A : array (1 .. N) of Integer;\n Count : Integer := 0;\n begin\n for I in 1 .. N loop\n A(I) := I * I - I + 1;\n end loop;\n \n for I in 1 .. N - 2 loop\n for J in I + 1 .. N - 1 loop\n for K in J + 1 .. N loop\n if (A(I) + A(J) + A(K)) mod 3 = 0 then\n Count := Count + 1;\n end if;\n end loop;\n end loop;\n end loop;\n \n return Count;", "log": ""} +{"name": "HumanEval_148_bf", "outcome": "compile_error", "completion": " is\n Planets : constant array (Positive range 1 .. 8) of String := (\n \"Mercury\", \"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\", \"Uranus\", \"Neptune\"\n );\n Index1, Index2 : Integer := -1;\n Result : Unbounded_String_Array(1..0);\n begin\n for I in Planets'Range loop\n if Planets(I) = Planet1 then\n Index1 := I;\n elsif Planets(I) = Planet2 then\n Index2 := I;\n end if;\n end loop;\n\n if Index1 = -1 or Index2 = -1 then\n return Result;\n end if;\n\n if Index1 > Index2 then\n Index1 := Index1 + Index2;\n Index2 := Index1 - Index2;\n Index1 := Index1 - Index2;\n end if;\n\n for I in Index1 + 1 .. Index2 - 1 loop\n Append(Result, To_Unbounded_String(Planets(I)));\n end loop;\n\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:78:51: error: missing operand\nprogram.ada:79:50: error: missing operand\nprogram.ada:80:56: error: missing operand\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_149_sorted_list_sum", "outcome": "compile_error", "completion": " is\n procedure Swap (I, J : in out Positive);\n procedure QuickSort (Left, Right : in Positive);\n\n procedure Swap (I, J : in out Positive) is\n Temp : constant Unbounded_String := Lst(I);\n begin\n Lst(I) := Lst(J);\n Lst(J) := Temp;\n end Swap;\n\n procedure QuickSort (Left, Right : in Positive) is\n Pivot : Positive := Left;\n I, J : Positive;\n begin\n if Left >= Right then\n return;\n end if;\n\n I := Left + 1;\n J := Right;\n\n loop\n while I <= J and then Length(Lst(I)) <= Length(Lst(Pivot)) loop\n if Length(Lst(I)) = Length(Lst(Pivot)) then\n exit when Lst(I) > Lst(Pivot);\n end if;\n I := I + 1;\n end loop;\n\n while I <= J and then Length(Lst(J)) >= Length(Lst(Pivot)) loop\n if Length(Lst(J)) = Length(Lst(Pivot)) then\n exit when Lst(J) < Lst(Pivot);\n end if;\n J := J - 1;\n end loop;\n\n exit when I > J;\n Swap(I, J);\n end loop;\n\n Swap(Left, J);\n QuickSort(Left, J - 1);\n QuickSort(J + 1, Right);\n end QuickSort;\n\n begin\n for I in Lst'Range loop\n if Length(Lst(I)) mod 2 /= 0 then\n Lst(I) := Null_Unbounded_String;\n end if;\n end loop;\n\n -- Remove null elements\n declare\n New_Lst : Unbounded_String_Array(Lst'First .. Lst'Last);\n Index : Positive := Lst'First;\n begin\n for I in Lst'Range loop\n if Lst(I) /= Null_Unbounded_String then\n New_Lst(Index) := Lst(I);\n Index := Index + 1;\n end if;\n end loop;\n Lst := New_Lst(Lst'First .. Index - 1);\n end;\n\n QuickSort(Lst'First, Lst'Last);\n return Lst;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:13:10: error: assignment to \"in\" mode parameter not allowed\nplaceholder.adb:14:10: error: assignment to \"in\" mode parameter not allowed\nplaceholder.adb:47:15: error: actual for \"I\" must be a variable\nplaceholder.adb:55:13: error: assignment to \"in\" mode parameter not allowed\nplaceholder.adb:70:10: error: assignment to \"in\" mode parameter not allowed\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_150_x_or_y", "outcome": "pass", "completion": " is\n function Is_Prime (Num : Integer) return Boolean is\n Divisor : Integer := 2;\n begin\n if Num <= 1 then\n return False;\n end if;\n while Divisor * Divisor <= Num loop\n if Num mod Divisor = 0 then\n return False;\n end if;\n Divisor := Divisor + 1;\n end loop;\n return True;\n end Is_Prime;\n begin\n if Is_Prime(N) then\n return X;\n else\n return Y;\n end if;", "log": ""} +{"name": "HumanEval_151_double_the_difference", "outcome": "compile_error", "completion": " is\n Sum : Integer := 0;\n begin\n for I in Lst'Range loop\n if Lst(I) >= 0 and then Lst(I) = Float(Integer(Lst(I))) and then Integer(Lst(I)) mod 2 /= 0 then\n Sum := Sum + Integer(Lst(I)) * Integer(Lst(I));\n end if;\n end loop;\n return Sum;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:9:20: error: invalid operand types for operator \">=\"\nplaceholder.adb:9:20: error: left operand has type \"Standard.Float\"\nplaceholder.adb:9:20: error: right operand has type universal integer\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_152_compare", "outcome": "pass", "completion": " is\n Result : Integer_Array (Game'Range);\n begin\n for I in Game'Range loop\n Result(I) := abs(Game(I) - Guess(I));\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_153_Strongest_Extension", "outcome": "compile_error", "completion": " is\n function Strength (Ext : Unbounded_String) return Integer is\n CAP : Natural := 0;\n SM : Natural := 0;\n begin\n for C of Ext loop\n if C in 'A' .. 'Z' then\n CAP := CAP + 1;\n elsif C in 'a' .. 'z' then\n SM := SM + 1;\n end if;\n end loop;\n return CAP - SM;\n end Strength;\n \n Best_Strength : Integer := Integer'Minimum;\n Best_Extension : Unbounded_String := Null_Unbounded_String;\n begin\n for Ext of Extensions loop\n declare\n Ext_Str : constant Integer := Strength(Ext);\n begin\n if Ext_Str > Best_Strength then\n Best_Strength := Ext_Str;\n Best_Extension := Ext;\n end if;\n end;\n end loop;\n return Class_Name & \".\" & Best_Extension;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:45:42: error: unrecognized attribute \"Minimum\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_154_cycpattern_check", "outcome": "compile_error", "completion": " is\n type String_Access is access all String;\n procedure Rotate (S : in out String_Access);\n function Is_Substring (Haystack, Needle : String) return Boolean;\n \n procedure Rotate (S : in out String_Access) is\n Temp : constant String := S.all & S.all(1 .. S'First - 1);\n begin\n S.all := Temp(S'Last - S'Length + 2 .. S'Last);\n end Rotate;\n \n function Is_Substring (Haystack, Needle : String) return Boolean is\n begin\n return Haystack'Unbounded_Slice(Haystack'First, Haystack'First + Needle'Length - 1) = Needle;\n end Is_Substring;\n \n B_Copy : String_Access := new String'(B);\n Result : Boolean := False;\n begin\n for _ in 1 .. B'Length loop\n if Is_Substring(A, B_Copy.all) then\n Result := True;\n exit;\n end if;\n Rotate(B_Copy);\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:37:26: error: unrecognized attribute \"Unbounded_Slice\"\nprogram.ada:43:11: error: identifier cannot start with underline\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_155_even_odd_count", "outcome": "runtime_error", "completion": " is\n Result : Integer_Integer_Tuple := (0, 0);\n Abs_Num : Integer := abs Num;\n begin\n while Abs_Num > 0 loop\n if (Abs_Num mod 10) mod 2 = 0 then\n Result.Integer_1 := Result.Integer_1 + 1;\n else\n Result.Integer_2 := Result.Integer_2 + 1;\n end if;\n Abs_Num := Abs_Num / 10;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:18\n[./main]\n0x408f9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40328e Main at main.adb:18\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fe160d0d248\n0x7fe160d0d303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_156_int_to_mini_roman", "outcome": "compile_error", "completion": " is\n type Roman_Symbol is record\n Value : Integer;\n Symbol : String(1..1);\n end record;\n Symbols : constant array(Integer range <>) of Roman_Symbol := (\n (1000, \"m\"),\n (900, \"cm\"),\n (500, \"d\"),\n (400, \"cd\"),\n (100, \"c\"),\n (90, \"xc\"),\n (50, \"l\"),\n (40, \"xl\"),\n (10, \"x\"),\n (9, \"ix\"),\n (5, \"v\"),\n (4, \"iv\"),\n (1, \"i\")\n );\n Result : String(1..30); -- Maximum length for a number <= 1000\n Index : Natural := 1; -- Start from the first symbol\n begin\n while Number > 0 loop\n if Number >= Symbols(Index).Value then\n Result(Result'First + Result'Length - 1 .. Result'Last) := Symbols(Index).Symbol;\n Number := Number - Symbols(Index).Value;\n else\n Index := Index + 1;\n end if;\n end loop;\n return Result(Result'First + Result'Length - Number .. Result'Last);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:12:16: warning: wrong length for array of subtype of \"Standard.String\" defined at line 8 [enabled by default]\nplaceholder.adb:12:16: warning: Constraint_Error will be raised at run time [enabled by default]\nplaceholder.adb:14:16: warning: wrong length for array of subtype of \"Standard.String\" defined at line 8 [enabled by default]\nplaceholder.adb:14:16: warning: Constraint_Error will be raised at run time [enabled by default]\nplaceholder.adb:16:15: warning: wrong length for array of subtype of \"Standard.String\" defined at line 8 [enabled by default]\nplaceholder.adb:16:15: warning: Constraint_Error will be raised at run time [enabled by default]\nplaceholder.adb:18:15: warning: wrong length for array of subtype of \"Standard.String\" defined at line 8 [enabled by default]\nplaceholder.adb:18:15: warning: Constraint_Error will be raised at run time [enabled by default]\nplaceholder.adb:20:14: warning: wrong length for array of subtype of \"Standard.String\" defined at line 8 [enabled by default]\nplaceholder.adb:20:14: warning: Constraint_Error will be raised at run time [enabled by default]\nplaceholder.adb:22:14: warning: wrong length for array of subtype of \"Standard.String\" defined at line 8 [enabled by default]\nplaceholder.adb:22:14: warning: Constraint_Error will be raised at run time [enabled by default]\nplaceholder.adb:29:31: warning: value not in range of subtype of \"Standard.Integer\" defined at line 10 [enabled by default]\nplaceholder.adb:29:31: warning: Constraint_Error will be raised at run time [enabled by default]\nplaceholder.adb:30:80: warning: value not in range of subtype of \"Standard.Integer\" defined at line 10 [enabled by default]\nplaceholder.adb:30:80: warning: Constraint_Error will be raised at run time [enabled by default]\nplaceholder.adb:31:13: error: assignment to \"in\" mode parameter not allowed\nplaceholder.adb:31:40: warning: value not in range of subtype of \"Standard.Integer\" defined at line 10 [enabled by default]"} +{"name": "HumanEval_157_right_angle_triangle", "outcome": "compile_error", "completion": " is\n Sides : array (1 .. 3) of Integer := (A, B, C);\n Hypotenuse : Integer;\n Other_Side1, Other_Side2 : Integer;\n begin\n -- Sort the sides to ensure the longest side is considered as the hypotenuse\n for I in 1 .. 2 loop\n for J in I + 1 .. 3 loop\n if Sides(I) > Sides(J) then\n Swap(Sides(I), Sides(J));\n end if;\n end loop;\n end loop;\n\n Hypotenuse := Sides(3);\n Other_Side1 := Sides(1);\n Other_Side2 := Sides(2);\n\n -- Check if the Pythagorean theorem holds\n return (Hypotenuse * Hypotenuse = Other_Side1 * Other_Side1 + Other_Side2 * Other_Side2);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:14:16: error: \"Swap\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_158_find_max", "outcome": "compile_error", "completion": " is\n Max_Unique_Chars : Natural := 0;\n Result : String := \"\";\n begin\n for Word of Words loop\n declare\n Unique_Chars : Natural := 0;\n Char_Set : array (Character) of Boolean := (others => False);\n begin\n for C of Word loop\n if not Char_Set(C) then\n Unique_Chars := Unique_Chars + 1;\n Char_Set(C) := True;\n end if;\n end loop;\n if Unique_Chars > Max_Unique_Chars or else\n (Unique_Chars = Max_Unique_Chars and then Word < To_Unbounded_String(Result)) then\n Max_Unique_Chars := Unique_Chars;\n Result := To_String(Word);\n end if;\n end;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:15:17: error: cannot iterate over \"Unbounded_String\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_159_eat", "outcome": "pass", "completion": " is\n Total_Eaten : Integer := Number + Need;\n Leftover : Integer := Remaining - Need;\n begin\n if Leftover < 0 then\n Total_Eaten := Number + Remaining;\n Leftover := 0;\n end if;\n return Integer_Array'(Total_Eaten, Leftover);", "log": ""} +{"name": "HumanEval_160_do_algebra", "outcome": "compile_error", "completion": " is\n Result : Integer := Operand(1);\n begin\n for I in 1 .. Operator'Length loop\n case To_Lower(Operator(I)) is\n when \"+\" =>\n Result := Result + Operand(I + 1);\n when \"-\" =>\n Result := Result - Operand(I + 1);\n when \"*\" =>\n Result := Result * Operand(I + 1);\n when \"//\" =>\n Result := Result / Operand(I + 1);\n when \"**\" =>\n Result := Result ** Operand(I + 1);\n when others =>\n raise Program_Error with \"Invalid operator: \" & To_String(Operator(I));\n end case;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:10:15: error: \"To_Lower\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_161_solve", "outcome": "compile_error", "completion": " is\n Result : String := S;\n Has_Letter : Boolean := False;\n begin\n for I in 1 .. S'Length loop\n if S(I) in 'a' .. 'z' or else S(I) in 'A' .. 'Z' then\n Has_Letter := True;\n if S(I) in 'a' .. 'z' then\n Result(I) := Character'Val(Character'Pos(S(I)) - Character'Pos('a') + Character'Pos('A'));\n else\n Result(I) := Character'Val(Character'Pos(S(I)) - Character'Pos('A') + Character'Pos('a'));\n end if;\n end if;\n end loop;\n \n if not Has_Letter then\n Result := Reverse_Slice(Result);\n end if;\n \n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:21:20: error: \"Reverse_Slice\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_162_string_to_md5", "outcome": "compile_error", "completion": " is\n use Ada.Strings.Unbounded;\n function MD5 (Data : in String) return String;\n pragma Import (C, MD5, \"md5\");\n begin\n if Text = \"\" then\n return Unbounded_String_Option'(False);\n else\n declare\n Hashed : constant String := MD5(Text);\n begin\n return Unbounded_String_Option'(True, To_Unbounded_String(Hashed));\n end;\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:8:16: warning: foreign convention function \"MD5\" should not return unconstrained array [-gnatwx]\nplaceholder.adb:12:42: error: positional aggregate cannot have one component\nplaceholder.adb:12:42: error: write instead \"Valid => ...\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_163_generate_integers", "outcome": "compile_error", "completion": " is\n Result : Integer_Array := Integer_Array'();\n Low, High : Integer;\n begin\n if A > B then\n Low := B;\n High := A;\n else\n Low := A;\n High := B;\n end if;\n\n for I in Low .. High loop\n if I mod 2 = 0 then\n Result := Result & I;\n end if;\n end loop;\n\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:22:48: error: missing operand\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} diff --git a/results/samples-jgalego--ada-coder-qwen2.5-7b.jsonl b/results/samples-jgalego--ada-coder-qwen2.5-7b.jsonl new file mode 100644 index 0000000..78b7dec --- /dev/null +++ b/results/samples-jgalego--ada-coder-qwen2.5-7b.jsonl @@ -0,0 +1,157 @@ +{"name": "HumanEval_0_has_close_elements", "outcome": "pass", "completion": " is\n Sorted : Float_Array := Numbers;\n Temp : Float;\n begin\n for I in Sorted'First .. Sorted'Last - 1 loop\n for J in I + 1 .. Sorted'Last loop\n if Sorted (J) < Sorted (I) then\n Temp := Sorted (I);\n Sorted (I) := Sorted (J);\n Sorted (J) := Temp;\n end if;\n end loop;\n end loop;\n for I in Sorted'First .. Sorted'Last - 1 loop\n if abs (Sorted (I) - Sorted (I + 1)) <= Threshold then\n return True;\n end if;\n end loop;\n return False;", "log": ""} +{"name": "HumanEval_1_separate_paren_groups", "outcome": "runtime_error", "completion": " is\n Result : Unbounded_String_Array (1 .. 50);\n Count : Natural := 0;\n Depth : Natural := 0;\n Start_Pos : Positive := Paren_String'First;\n begin\n for I in Paren_String'Range loop\n if Paren_String (I) = '(' then\n Depth := Depth + 1;\n elsif Paren_String (I) = ')' then\n Depth := Depth - 1;\n end if;\n if Depth = 0 and then I > Start_Pos then\n Count := Count + 1;\n Result (Count) := To_Unbounded_String (Paren_String (Start_Pos .. I));\n Start_Pos := I + 1;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x4139df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40517b Main at main.adb:12\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f7acd549248\n0x7f7acd549303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_2_truncate_number", "outcome": "runtime_error", "completion": " is\n Int_Part : constant Integer := Integer (Number);\n begin\n return Number - Float (Int_Part);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408d9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403010 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fbaf165f248\n0x7fbaf165f303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_3_below_zero", "outcome": "pass", "completion": " is\n Balance : Integer := 0;\n begin\n for Op of Operations loop\n Balance := Balance + Op;\n if Balance < 0 then\n return True;\n end if;\n end loop;\n return False;", "log": ""} +{"name": "HumanEval_4_mean_absolute_deviation", "outcome": "pass", "completion": " is\n Sum : Float := 0.0;\n Average : Float;\n Total : Float := 0.0;\n begin\n for N of Numbers loop\n Sum := Sum + N;\n end loop;\n Average := Sum / Float (Numbers'Length);\n for N of Numbers loop\n Total := Total + abs (N - Average);\n end loop;\n return Total / Float (Numbers'Length);", "log": ""} +{"name": "HumanEval_5_intersperse", "outcome": "runtime_error", "completion": " is\n Result_Len : Natural := 0;\n begin\n for I in Numbers'Range loop\n if I > Numbers'First then\n Result_Len := Result_Len + 1;\n end if;\n Result_Len := Result_Len + 1;\n end loop;\n declare\n Result : Integer_Array (1 .. Result_Len);\n Pos : Positive := 1;\n begin\n for I in Numbers'Range loop\n Result (Pos) := Numbers (I);\n Pos := Pos + 1;\n if I > Numbers'First then\n Result (Pos) := Delimeter;\n Pos := Pos + 1;\n end if;\n end loop;\n return Result;\n end;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x40929f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033b4 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f9bd3423248\n0x7f9bd3423303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_6_parse_nested_parens", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. Paren_String'Length);\n Start_Pos : Positive := Paren_String'First;\n Group_End : Natural;\n Depth : Natural;\n Max_Depth : Natural;\n begin\n for I in 1 .. Paren_String'Length loop\n if Paren_String (I) = ' ' then\n Group_End := I - 1;\n Depth := 0;\n Max_Depth := 0;\n for J in Start_Pos .. Group_End loop\n if Paren_String (J) = '(' then\n Depth := Depth + 1;\n if Depth > Max_Depth then\n Max_Depth := Depth;\n end if;\n elsif Paren_String (J) = ')' then\n Depth := Depth - 1;\n end if;\n end loop;\n Result (I) := Max_Depth;\n Start_Pos := I + 1;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40945f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033f6 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7efd925df248\n0x7efd925df303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_7_filter_by_substring", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array (1 .. Strings'Length);\n Count : Natural := 0;\n begin\n for S of Strings loop\n if Index (To_String (S), Substring) > 0 then\n Count := Count + 1;\n Result (Count) := S;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:11:13: error: no candidate interpretations match the actuals:\nplaceholder.adb:11:13: error: missing argument for parameter \"From\" in call to \"Index\" declared at a-strunb.ads:393\nplaceholder.adb:11:13: error: missing argument for parameter \"From\" in call to \"Index\" declared at a-strunb.ads:381\nplaceholder.adb:11:13: error: missing argument for parameter \"From\" in call to \"Index\" declared at a-strunb.ads:369\nplaceholder.adb:11:13: error: missing argument for parameter \"Mapping\" in call to \"Index\" declared at a-strunb.ads:352\nplaceholder.adb:11:20: error: expected private type \"Ada.Strings.Unbounded.Unbounded_String\"\nplaceholder.adb:11:20: error: found type \"Standard.String\"\nplaceholder.adb:11:20: error: ==> in call to \"Index\" at a-strunb.ads:361\nplaceholder.adb:11:20: error: expected private type \"Ada.Strings.Unbounded.Unbounded_String\"\nplaceholder.adb:11:20: error: found type \"Standard.String\"\nplaceholder.adb:11:20: error: ==> in call to \"Index\" at a-strunb.ads:343\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_8_sum_product", "outcome": "pass", "completion": " is\n Result : Integer_Integer_Tuple := (Integer_1 => 0, Integer_2 => 1);\n begin\n for N of Numbers loop\n Result.Integer_1 := Result.Integer_1 + N;\n Result.Integer_2 := Result.Integer_2 * N;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_9_rolling_max", "outcome": "pass", "completion": " is\n Result : Integer_Array := Numbers;\n begin\n for I in 2 .. Numbers'Last loop\n if Numbers (I) > Result (I - 1) then\n Result (I) := Numbers (I);\n else\n Result (I) := Result (I - 1);\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_10_make_palindrome", "outcome": "runtime_error", "completion": " is\n Len : constant Natural := My_String'Length;\n Reverse_Str : String (1 .. Len);\n begin\n if Len = 0 then\n return \"\";\n end if;\n for I in 1 .. Len loop\n Reverse_Str (I) := My_String (Len - I + 1);\n end loop;\n declare\n Suffix_Start : Positive := Len;\n begin\n while Suffix_Start > 1 and then\n My_String (Suffix_Start - 1 .. Suffix_Start) =\n My_String (Suffix_Start .. Suffix_Start)\n loop\n Suffix_Start := Suffix_Start - 1;\n end loop;\n return My_String & Reverse_Str (Suffix_Start .. Len);\n end;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x4097df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403674 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f8771859248\n0x7f8771859303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_11_string_xor", "outcome": "pass", "completion": " is\n Result : String := A;\n begin\n for I in A'Range loop\n if A (I) = B (I) then\n Result (I) := '0';\n else\n Result (I) := '1';\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_12_longest", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Option;\n begin\n if Strings'Length = 0 then\n return Result;\n end if;\n Result := (Valid => True, Value => Strings (Strings'First));\n for I in Strings'First + 1 .. Strings'Last loop\n if Length (Strings (I)) > Length (Result.Value) then\n Result := (Valid => True, Value => Strings (I));\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_13_greatest_common_divisor", "outcome": "pass", "completion": " is\n X : Natural := abs A;\n Y : Natural := abs B;\n Tmp : Natural;\n begin\n while Y > 0 loop\n Tmp := Y;\n Y := X mod Y;\n X := Tmp;\n end loop;\n return X;", "log": ""} +{"name": "HumanEval_14_all_prefixes", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. My_String'Length);\n begin\n for I in My_String'Range loop\n Result (I - My_String'First + 1) := To_Unbounded_String (My_String (My_String'First .. I));\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_15_string_sequence", "outcome": "runtime_error", "completion": " is\n Result : String (1 .. N * 6);\n Pos : Natural := 0;\n begin\n for I in 0 .. N loop\n declare\n Img : constant String := Integer'Image (I);\n begin\n if Pos > 0 then\n Pos := Pos + 1;\n Result (Pos) := ' ';\n end if;\n Result (Pos + 1 .. Pos + Img'Length - 1) := Img (Img'First + 1 .. Img'Last);\n Pos := Pos + Img'Length - 1;\n end;\n end loop;\n return Result (1 .. Pos);", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:17 range check failed\n[./main]\n0x403181 Placeholder.String_Sequence at placeholder.adb:17\n0x40335c Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f272a275248\n0x7f272a275303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_16_count_distinct_characters", "outcome": "runtime_error", "completion": " is\n Seen : array (Character range 'a' .. 'z') of Boolean := [others => False];\n Count : Natural := 0;\n begin\n for C of My_String loop\n declare\n Lower : constant Character :=\n (if C in 'A' .. 'Z' then Character'Val (Character'Pos (C) + 32)\n else C);\n begin\n if not Seen (Lower) then\n Seen (Lower) := True;\n Count := Count + 1;\n end if;\n end;\n end loop;\n return Count;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:15:20 index check failed\nindex 32 not in 97..122\n[./main]\n0x40302c Placeholder.Count_Distinct_Characters at placeholder.adb:15\n0x40323e Main at main.adb:15\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fc93fb56248\n0x7fc93fb56303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_17_parse_music", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. Music_String'Length / 3);\n Pos : Positive := Music_String'First;\n Idx : Natural := 0;\n begin\n while Pos <= Music_String'Last loop\n if Music_String (Pos .. Pos + 1) = \"o|\" then\n Result (Idx + 1) := 2;\n Pos := Pos + 2;\n elsif Music_String (Pos .. Pos + 1) = \".|\" then\n Result (Idx + 1) := 1;\n Pos := Pos + 2;\n else\n Result (Idx + 1) := 4;\n Pos := Pos + 2;\n end if;\n Idx := Idx + 1;\n end loop;\n return Result;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:18:13 index check failed\nindex 3 not in 1..2\n[./main]\n0x403287 Placeholder.Parse_Music at placeholder.adb:18\n0x403469 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f9a1e76d248\n0x7f9a1e76d303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_18_how_many_times", "outcome": "pass", "completion": " is\n Result : Natural := 0;\n Pos : Positive := My_String'First;\n begin\n if Substring'Length = 0 then\n return 0;\n end if;\n while Pos <= My_String'Last - Substring'Length + 1 loop\n if My_String (Pos .. Pos + Substring'Length - 1) = Substring then\n Result := Result + 1;\n Pos := Pos + 1;\n else\n Pos := Pos + 1;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_19_sort_numbers", "outcome": "compile_error", "completion": " is\n type Num_Array is array (1 .. 9) of Natural;\n type Word_Array is array (1 .. 9) of access constant String;\n Words : constant Word_Array :=\n [new String'(\"zero\"), new String'(\"one\"), new String'(\"two\"),\n new String'(\"three\"), new String'(\"four\"), new String'(\"five\"),\n new String'(\"six\"), new String'(\"seven\"), new String'(\"eight\"),\n new String'(\"nine\")];\n Counts : Num_Array := [others => 0];\n Result : String (1 .. Numbers'Length);\n Pos : Positive := 1;\n begin\n for I in Numbers'Range loop\n if Numbers (I) = ' ' then\n null;\n else\n declare\n W : Natural := 0;\n begin\n for J in Words'Range loop\n if Words (J).all = Numbers (I .. I + Words (J).all'Length - 1) then\n W := J;\n exit;\n end if;\n end loop;\n Counts (W) := Counts (W) + 1;\n end;\n end if;\n end loop;\n for I in 1 .. 9 loop\n for J in 1 .. Counts (I) loop\n while Pos <= Result'Last and then Result (Pos) /= ' ' loop\n Pos := Pos + 1;\n end loop;\n if Pos > Result'Last then\n exit;\n end if;\n Result (Pos) := ' ';\n Pos := Pos + 1;\n while Pos <= Result'Last and then Result (Pos) /= ' ' loop\n Pos := Pos + 1;\n end loop;\n if Pos > Result'Last then\n exit;\n end if;\n Result (Pos) := Words (I).all (Words (I).all'First ..\n Words (I).all'First + Words (I).all'Length - 1);\n Pos := Pos + Words (I).all'Length;\n end loop;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:9:09: warning: upper bound of aggregate out of range [enabled by default]\nplaceholder.adb:9:09: warning: Constraint_Error will be raised at run time [enabled by default]\nplaceholder.adb:50:39: error: expected type \"Standard.Character\"\nplaceholder.adb:50:39: error: found type \"Standard.String\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_20_find_closest_elements", "outcome": "pass", "completion": " is\n Min_Diff : Float := Float'Last;\n Result : Float_Float_Tuple;\n begin\n for I in Numbers'First .. Numbers'Last - 1 loop\n for J in I + 1 .. Numbers'Last loop\n declare\n Diff : constant Float :=\n abs (Numbers (I) - Numbers (J));\n begin\n if Diff < Min_Diff then\n Min_Diff := Diff;\n Result.Float_1 := Float'Min (Numbers (I), Numbers (J));\n Result.Float_2 := Float'Max (Numbers (I), Numbers (J));\n end if;\n end;\n end loop;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_21_rescale_to_unit", "outcome": "compile_error", "completion": " is\n Min_Val : Float := Float'Last;\n Max_Val : Float := Float'First;\n begin\n for N of Numbers loop\n if N < Min_Val then Min_Val := N; end if;\n if N > Max_Val then Max_Val := N; end if;\n end loop;\n declare\n Range_Val : constant Float := Max_Val - Min_Val;\n begin\n if Range_Val = 0.0 then\n return (others => 0.0);\n end if;\n declare\n Result : Float_Array (Numbers'Range);\n begin\n for I in Numbers'Range loop\n Result (I) := (Numbers (I) - Min_Val) / Range_Val;\n end loop;\n return Result;\n end;\n end;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:17:21: error: \"others\" choice not allowed here\nplaceholder.adb:17:21: error: qualify the aggregate with a constrained subtype to provide bounds for it\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_23_strlen", "outcome": "compile_error", "completion": " is\n (Integer (My_String'Length));\nend Placeholder;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\nprogram.ada:19:04: error: compilation unit expected\nprogram.ada:24:01: error: misplaced \"with\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_24_largest_divisor", "outcome": "pass", "completion": " is\n Result : Integer := N / 2;\n begin\n while Result > 0 loop\n if N mod Result = 0 then\n return Result;\n end if;\n Result := Result - 1;\n end loop;\n return 1;", "log": ""} +{"name": "HumanEval_25_factorize", "outcome": "compile_error", "completion": " is\n Result : Integer_Array (1 .. N);\n Count : Natural := 0;\n I : Positive := 2;\n begin\n while N > 1 loop\n if N mod I = 0 then\n Count := Count + 1;\n Result (Count) := I;\n N := N / I;\n else\n I := I + 1;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:14:13: error: assignment to \"in\" mode parameter not allowed\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_26_remove_duplicates", "outcome": "runtime_error", "completion": " is\n Seen : Boolean := False;\n Result : Integer_Array (1 .. Numbers'Length);\n Count : Natural := 0;\n begin\n for I in Numbers'Range loop\n Seen := False;\n for J in Numbers'First .. I - 1 loop\n if Numbers (J) = Numbers (I) then\n Seen := True;\n exit;\n end if;\n end loop;\n if not Seen then\n Count := Count + 1;\n Result (Count) := Numbers (I);\n end if;\n end loop;\n return Result (1 .. Count);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x40931f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403507 Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fc0136d8248\n0x7fc0136d8303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_27_flip_case", "outcome": "pass", "completion": " is\n Result : String := My_String;\n begin\n for I in Result'Range loop\n if Result (I) >= 'a' and then Result (I) <= 'z' then\n Result (I) := Character'Val (Character'Pos (Result (I)) - 32);\n elsif Result (I) >= 'A' and then Result (I) <= 'Z' then\n Result (I) := Character'Val (Character'Pos (Result (I)) + 32);\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_28_concatenate", "outcome": "pass", "completion": " is\n Result : Unbounded_String := Null_Unbounded_String;\n begin\n for S of Strings loop\n Append (Result, S);\n end loop;\n return To_String (Result);", "log": ""} +{"name": "HumanEval_29_filter_by_prefix", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. Strings'Length);\n Count : Natural := 0;\n begin\n for S of Strings loop\n if Length (S) >= Prefix'Length and then Slice (S, 1, Prefix'Length) = Prefix then\n Count := Count + 1;\n Result (Count) := S;\n end if;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_30_get_positive", "outcome": "pass", "completion": " is\n Result : Integer_Array (1 .. L'Length);\n Count : Natural := 0;\n begin\n for V of L loop\n if V > 0 then\n Count := Count + 1;\n Result (Count) := V;\n end if;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_31_is_prime", "outcome": "pass", "completion": " is\n I : Positive := 2;\n begin\n if N < 2 then\n return False;\n end if;\n while I * I <= N loop\n if N mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_33_sort_third", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array := L;\n Temp : Integer;\n begin\n for I in Result'Range loop\n if I mod 3 = 0 then\n for J in I + 1 .. Result'Last loop\n if J mod 3 = 0 and then Result (J) < Result (I) then\n Temp := Result (I);\n Result (I) := Result (J);\n Result (J) := Temp;\n end if;\n end loop;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x4094df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033b2 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f5079159248\n0x7f5079159303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_34_unique", "outcome": "compile_error", "completion": " is\n Result : Integer_Array := [];\n Seen : Boolean (Integer'Range);\n begin\n for I in L'Range loop\n if not Seen (L (I)) then\n Seen (L (I)) := True;\n Result := Result & L (I);\n end if;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:7:24: error: incorrect constraint for this kind of type\nplaceholder.adb:10:17: error: array type required in indexed component\nplaceholder.adb:11:13: error: array type required in indexed component\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_35_max_element", "outcome": "pass", "completion": " is\n Result : Integer := L (L'First);\n begin\n for I in L'First + 1 .. L'Last loop\n if L (I) > Result then\n Result := L (I);\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_36_fizz_buzz", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for I in 1 .. N - 1 loop\n if I mod 11 = 0 or else I mod 13 = 0 then\n declare\n S : constant String := Integer'Image (I);\n begin\n for C of S loop\n if C = '7' then\n Count := Count + 1;\n end if;\n end loop;\n end;\n end if;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_37_sort_even", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array := L;\n Temp : Integer;\n begin\n for I in Result'First .. Result'Last - 1 loop\n if I mod 2 = 0 then\n for J in I + 1 .. Result'Last loop\n if J mod 2 = 0 and then Result (J) < Result (I) then\n Temp := Result (I);\n Result (I) := Result (J);\n Result (J) := Temp;\n end if;\n end loop;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x4093df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403508 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f4c38b44248\n0x7f4c38b44303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_39_prime_fib", "outcome": "runtime_error", "completion": " is\n pragma Unreferenced (N);\n begin\n return 2;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x408e5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x402f96 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f27b3650248\n0x7f27b3650303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_40_triples_sum_to_zero", "outcome": "pass", "completion": " is\n N : constant Natural := L'Length;\n begin\n for I in L'Range loop\n for J in I + 1 .. L'Last loop\n for K in J + 1 .. L'Last loop\n if L (I) + L (J) + L (K) = 0 then\n return True;\n end if;\n end loop;\n end loop;\n end loop;\n return False;", "log": ""} +{"name": "HumanEval_41_car_race_collision", "outcome": "pass", "completion": " is\n pragma Unreferenced (N);\n begin\n return N * N;", "log": ""} +{"name": "HumanEval_42_incr_list", "outcome": "pass", "completion": " is\n Result : Integer_Array := L;\n begin\n for I in Result'Range loop\n Result (I) := Result (I) + 1;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_43_pairs_sum_to_zero", "outcome": "pass", "completion": " is\n Seen : Boolean := False;\n begin\n for I in L'Range loop\n for J in I + 1 .. L'Last loop\n if L (I) + L (J) = 0 then\n Seen := True;\n end if;\n end loop;\n end loop;\n return Seen;", "log": ""} +{"name": "HumanEval_44_change_base", "outcome": "compile_error", "completion": " is\n Result : String (1 .. 50);\n Pos : Natural := Result'Last;\n Temp : Integer;\n begin\n if X = 0 then\n return \"0\";\n end if;\n while X > 0 loop\n Temp := X mod Base;\n X := X / Base;\n if Temp < 10 then\n Result (Pos) := Character'Val (Character'Pos ('0') + Temp);\n else\n Result (Pos) := Character'Val (Character'Pos ('A') + Temp - 10);\n end if;\n Pos := Pos - 1;\n end loop;\n return Result (Pos + 1 .. Result'Last);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:15:10: error: assignment to \"in\" mode parameter not allowed\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_45_triangle_area", "outcome": "compile_error", "completion": " is\n (Float (A * H) / 2.0);\nend Placeholder;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\nprogram.ada:17:04: error: compilation unit expected\nprogram.ada:22:01: error: misplaced \"with\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_46_fib4", "outcome": "runtime_error", "completion": " is\n A : constant array (0 .. 3) of Integer := [0, 0, 2, 0];\n Result : Integer := 0;\n Prev : Integer := 0;\n Temp : Integer;\n begin\n if N < 4 then\n return A (N);\n end if;\n Prev := A (3);\n for I in 4 .. N loop\n Temp := Result;\n Result := Result + Prev;\n Prev := Temp;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408d9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403030 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f383ecc1248\n0x7f383ecc1303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_47_median", "outcome": "compile_error", "completion": " is\n Sorted : Integer_Array := L;\n Len : constant Natural := L'Length;\n Mid : constant Positive := (Len + 1) / 2;\n begin\n for I in Sorted'First .. Sorted'Last - 1 loop\n for J in I + 1 .. Sorted'Last loop\n if Sorted (J) < Sorted (I) then\n declare\n Tmp : constant Integer := Sorted (I);\n begin\n Sorted (I) := Sorted (J);\n Sorted (J) := Tmp;\n end;\n end if;\n end loop;\n end loop;\n if Len mod 2 = 0 then\n return Float (Sorted (Mid - 1) + Sorted (Mid)) / 2.0;\n else\n return Float (Sorted (Mid));\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:11:47: error: invalid operand types for operator \"=\"\nmain.adb:11:47: error: left operand has type \"Standard.Float\"\nmain.adb:11:47: error: right operand has type universal integer\nmain.adb:13:35: error: invalid operand types for operator \"=\"\nmain.adb:13:35: error: left operand has type \"Standard.Float\"\nmain.adb:13:35: error: right operand has type universal integer\nmain.adb:15:53: error: invalid operand types for operator \"=\"\nmain.adb:15:53: error: left operand has type \"Standard.Float\"\nmain.adb:15:53: error: right operand has type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_48_is_palindrome", "outcome": "pass", "completion": " is\n Left : Positive := Text'First;\n Right : Natural := Text'Last;\n begin\n while Left < Right loop\n if Text (Left) /= Text (Right) then\n return False;\n end if;\n Left := Left + 1;\n Right := Right - 1;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_49_modp", "outcome": "pass", "completion": " is\n Result : Integer := 1;\n Base : Integer := 2 mod P;\n Exp : Natural := N;\n begin\n while Exp > 0 loop\n if Exp mod 2 = 1 then\n Result := (Result * Base) mod P;\n end if;\n Exp := Exp / 2;\n Base := (Base * Base) mod P;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_51_remove_vowels", "outcome": "compile_error", "completion": " is\n Result : String (1 .. Text'Length);\n Len : Natural := 0;\n begin\n for Ch of Text loop\n if Ch /= 'a' and then Ch /= 'e' and then Ch /= 'i'\n and then Ch /= 'o' and then Ch /= 'u'\n and then Ch /= 'A' and then Ch /= 'E' and then Ch /= 'I'\n and then Ch /= 'O' and then Ch /= 'U'\n then\n Len := Len + 1;\n Result (Len) := Ch;\n end if;\n end loop;\n return Result (1 .. Len);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:51:37: error: missing string quote\nprogram.ada:52:08: error: binary operator expected\nprogram.ada:53:08: error: missing string quote\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_52_below_threshold", "outcome": "pass", "completion": " is\n begin\n for V of L loop\n if V >= T then\n return False;\n end if;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_53_add", "outcome": "compile_error", "completion": " is\n (X + Y);\nend Placeholder;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\nprogram.ada:19:04: error: compilation unit expected\nprogram.ada:24:01: error: misplaced \"with\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_54_same_chars", "outcome": "runtime_error", "completion": " is\n type Char_Counts is array (Character range 'a' .. 'z') of Natural;\n C0, C1 : Char_Counts := [others => 0];\n begin\n for Ch of S0 loop\n if Ch in 'a' .. 'z' then\n C0 (Ch) := C0 (Ch) + 1;\n end if;\n end loop;\n for Ch of S1 loop\n if Ch in 'a' .. 'z' then\n C1 (Ch) := C1 (Ch) + 1;\n end if;\n end loop;\n for I in Character range 'a' .. 'z' loop\n if C0 (I) /= C1 (I) then\n return False;\n end if;\n end loop;\n return True;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40931f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032fb Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7ff6fafdc248\n0x7ff6fafdc303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_55_fib", "outcome": "pass", "completion": " is\n A : Integer := 0;\n B : Integer := 1;\n Tmp : Integer;\n begin\n if N = 0 then\n return 0;\n end if;\n for I in 2 .. N loop\n Tmp := A + B;\n A := B;\n B := Tmp;\n end loop;\n return B;", "log": ""} +{"name": "HumanEval_56_correct_bracketing", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for C of Brackets loop\n if C = '<' then\n Count := Count + 1;\n elsif C = '>' then\n if Count = 0 then\n return False;\n end if;\n Count := Count - 1;\n end if;\n end loop;\n return Count = 0;", "log": ""} +{"name": "HumanEval_57_monotonic", "outcome": "pass", "completion": " is\n Incr : Boolean := False;\n Decr : Boolean := False;\n begin\n if L'Length <= 1 then\n return True;\n end if;\n for I in L'First .. L'Last - 1 loop\n if L (I + 1) > L (I) then\n Incr := True;\n elsif L (I + 1) < L (I) then\n Decr := True;\n end if;\n exit when Incr and Decr;\n end loop;\n return not (Incr and Decr);", "log": ""} +{"name": "HumanEval_58_common", "outcome": "compile_error", "completion": " is\n Result : Integer_Array (1 .. Positive'Last);\n Count : Natural := 0;\n begin\n for I in L1'Range loop\n if not Is_In (L1 (I), L2) then\n continue;\n end if;\n for J in 1 .. Count loop\n if Result (J) = L1 (I) then\n goto Continue;\n end if;\n end loop;\n Count := Count + 1;\n Result (Count) := L1 (I);\n <>\n end loop;\n return Result (1 .. Count);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:10:17: error: \"Is_In\" is undefined\nplaceholder.adb:11:13: error: procedure or entry name expected\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_59_largest_prime_factor", "outcome": "pass", "completion": " is\n Result : Integer := 1;\n Candidate : Integer := N;\n Divisor : Positive := 2;\n begin\n while Candidate > 1 loop\n if Candidate mod Divisor = 0 then\n Result := Divisor;\n Candidate := Candidate / Divisor;\n else\n Divisor := Divisor + 1;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_60_sum_to_n", "outcome": "pass", "completion": " is\n Result : Integer := 0;\n begin\n for I in 1 .. N loop\n Result := Result + I;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_61_correct_bracketing", "outcome": "runtime_error", "completion": " is\n Count : Natural := 0;\n begin\n for C of Brackets loop\n if C = '(' then\n Count := Count + 1;\n elsif C = ')' then\n Count := Count - 1;\n if Count < 0 then\n return False;\n end if;\n end if;\n end loop;\n return Count = 0;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:12:28 range check failed\nvalue -1 not in 0..2147483647\n[./main]\n0x402fef Placeholder.Correct_Bracketing at placeholder.adb:12\n0x4031d6 Main at main.adb:15\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7facc0ea0248\n0x7facc0ea0303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_62_derivative", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. Xs'Length - 1);\n begin\n for I in Xs'First .. Xs'Last - 1 loop\n Result (I - Xs'First + 1) := Xs (I) * (I - Xs'First + 1);\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40969f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403398 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f6f2ff81248\n0x7f6f2ff81303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_63_fibfib", "outcome": "runtime_error", "completion": " is\n A : Integer := 0;\n B : Integer := 0;\n C : Integer := 1;\n Tmp : Integer;\n begin\n if N <= 1 then\n return 0;\n end if;\n for I in 2 .. N loop\n Tmp := A + B + C;\n A := B;\n B := C;\n C := Tmp;\n end loop;\n return C;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x408e5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40309d Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f14d6115248\n0x7f14d6115303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_64_vowels_count", "outcome": "runtime_error", "completion": " is\n Count : Natural := 0;\n begin\n for C of S loop\n if C = 'a' or else C = 'e' or else C = 'i'\n or else C = 'o' or else C = 'u'\n then\n Count := Count + 1;\n end if;\n end loop;\n if S'Length > 0 and then S (S'Last) = 'y' then\n Count := Count + 1;\n end if;\n return Count;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x408fdf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403119 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fcda0249248\n0x7fcda0249303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_65_circular_shift", "outcome": "runtime_error", "completion": " is\n S : constant String := X'Image;\n Digs : constant String := S (S'First + 1 .. S'Last);\n Len : constant Natural := Digs'Length;\n Actual_Shift : Natural;\n begin\n if Len = 0 then\n return \"\";\n end if;\n Actual_Shift := abs Shift mod Len;\n if Actual_Shift = 0 then\n return Digs;\n end if;\n if Shift < 0 then\n Actual_Shift := Len - Actual_Shift;\n end if;\n return Digs (Digs'Last - Actual_Shift + 1 .. Digs'Last) &\n Digs (Digs'First .. Digs'Last - Actual_Shift);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x40975f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403732 Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fc36375f248\n0x7fc36375f303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_66_digitSum", "outcome": "pass", "completion": " is\n Sum : Integer := 0;\n begin\n for C of S loop\n if C in 'A' .. 'Z' then\n Sum := Sum + Character'Pos (C);\n end if;\n end loop;\n return Sum;", "log": ""} +{"name": "HumanEval_67_fruit_distribution", "outcome": "runtime_error", "completion": " is\n Start : Natural := S'First;\n Count : Natural := 0;\n begin\n while Start <= S'Last loop\n if S (Start .. Start + 1) = \"or\" then\n Count := 0;\n Start := Start + 4;\n while Start <= S'Last and then S (Start) /= ' ' loop\n Count := Count * 10 + Character'Pos (S (Start)) - Character'Pos ('0');\n Start := Start + 1;\n end loop;\n else\n Start := Start + 1;\n end if;\n end loop;\n return N - Count;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40915f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403205 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f689de2c248\n0x7f689de2c303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_68_pluck", "outcome": "runtime_error", "completion": " is\n Best_Val : Natural := Natural'Last;\n Best_Idx : Positive := Arr'First;\n begin\n for I in Arr'Range loop\n if Arr (I) mod 2 = 0 then\n if Arr (I) < Best_Val or else\n (Arr (I) = Best_Val and then I < Best_Idx)\n then\n Best_Val := Arr (I);\n Best_Idx := I;\n end if;\n end if;\n end loop;\n if Best_Val = Natural'Last then\n return [];\n end if;\n return [Best_Val, Best_Idx];", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40985f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4031e6 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fd48fbd6248\n0x7fd48fbd6303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_69_search", "outcome": "pass", "completion": " is\n Count : array (Integer range 1 .. 100) of Natural := [others => 0];\n Max_V : Integer := -1;\n begin\n for V of Lst loop\n if V <= 100 then\n Count (V) := Count (V) + 1;\n end if;\n end loop;\n for I in Count'Range loop\n if I > 0 and then Count (I) >= I then\n Max_V := I;\n end if;\n end loop;\n return Max_V;", "log": ""} +{"name": "HumanEval_70_strange_sort_list", "outcome": "compile_error", "completion": " is\n Result : Integer_Array := Lst;\n Left : Positive := Result'First;\n Right : Natural := Result'Last;\n Temp : Integer;\n begin\n while Left <= Right loop\n if Left = Right then\n exit;\n end if;\n declare\n Min_Val : constant Integer :=\n (for V of Result (Left .. Right) => V)'Min;\n Max_Val : constant Integer :=\n (for V of Result (Left .. Right) => V)'Max;\n begin\n for I in Left .. Right loop\n if Result (I) = Min_Val then\n Temp := Result (I);\n Result (I) := Result (Right);\n Result (Right) := Temp;\n Right := Right - 1;\n elsif Result (I) = Max_Val then\n Temp := Result (I);\n Result (I) := Result (Left);\n Result (Left) := Temp;\n Left := Left + 1;\n end if;\n end loop;\n end;\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:34:53: error: prefix of attribute must be a name\nprogram.ada:34:53: error: qualify expression to turn it into a name\nprogram.ada:36:53: error: prefix of attribute must be a name\nprogram.ada:36:53: error: qualify expression to turn it into a name\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_71_triangle_area", "outcome": "compile_error", "completion": " is\n S : constant Float := (Float (A) + Float (B) + Float (C)) / 2.0;\n begin\n if A + B > C and then A + C > B and then B + C > A then\n declare\n Area : constant Float :=\n Float (abs (Integer'(-S * (S - Float (A)) * (S - Float (B))\n * (S - Float (C)))));\n begin\n return Float'Rounding (Area);\n end;\n else\n return -1.0;\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:12:40: error: invalid operand types for operator \"=\"\nmain.adb:12:40: error: left operand has type \"Standard.Float\"\nmain.adb:12:40: error: right operand has type universal integer\nmain.adb:15:39: error: invalid operand types for operator \"=\"\nmain.adb:15:39: error: left operand has type \"Standard.Float\"\nmain.adb:15:39: error: right operand has type universal integer\nmain.adb:17:39: error: invalid operand types for operator \"=\"\nmain.adb:17:39: error: left operand has type \"Standard.Float\"\nmain.adb:17:39: error: right operand has type universal integer\nmain.adb:19:40: error: invalid operand types for operator \"=\"\nmain.adb:19:40: error: left operand has type \"Standard.Float\"\nmain.adb:19:40: error: right operand has type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_72_will_it_fly", "outcome": "pass", "completion": " is\n Sum : Integer := 0;\n Balanced : Boolean := True;\n begin\n for I in Q'Range loop\n Sum := Sum + Q (I);\n if I <= Q'First + (Q'Last - I) / 2 then\n if Q (I) /= Q (Q'Last - I + 1) then\n Balanced := False;\n end if;\n end if;\n end loop;\n return Balanced and then Sum <= W;", "log": ""} +{"name": "HumanEval_73_smallest_change", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n Left : Positive := Arr'First;\n Right : Positive := Arr'Last;\n begin\n while Left < Right loop\n if Arr (Left) /= Arr (Right) then\n Count := Count + 1;\n end if;\n Left := Left + 1;\n Right := Right - 1;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_74_total_match", "outcome": "pass", "completion": " is\n Sum1 : Natural := 0;\n Sum2 : Natural := 0;\n begin\n for S of Lst1 loop\n Sum1 := Sum1 + Length (S);\n end loop;\n for S of Lst2 loop\n Sum2 := Sum2 + Length (S);\n end loop;\n if Sum1 <= Sum2 then\n return Lst1;\n else\n return Lst2;\n end if;", "log": ""} +{"name": "HumanEval_75_is_multiply_prime", "outcome": "runtime_error", "completion": " is\n function Is_Prime (N : Positive) return Boolean is\n I : Natural := 2;\n begin\n if N < 2 then\n return False;\n end if;\n while I <= N / 2 loop\n if N mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;\n end Is_Prime;\n\n Cnt : Natural := 0;\n I : Positive := 2;\n begin\n while I <= A / 2 loop\n if A mod I = 0 and then Is_Prime (I) then\n Cnt := Cnt + 1;\n exit when Cnt > 3;\n end if;\n I := I + 1;\n end loop;\n return Cnt = 3;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x408f9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40312d Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fc30b2db248\n0x7fc30b2db303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_76_is_simple_power", "outcome": "pass", "completion": " is\n Power : Integer := 1;\n begin\n if X = 1 then\n return True;\n end if;\n if N <= 1 or else X < 1 then\n return False;\n end if;\n while Power < X loop\n Power := Power * N;\n end loop;\n return Power = X;", "log": ""} +{"name": "HumanEval_77_iscube", "outcome": "pass", "completion": " is\n Abs_A : constant Natural := abs A;\n Root : Natural := 0;\n begin\n while Root * Root * Root < Abs_A loop\n Root := Root + 1;\n end loop;\n return Root * Root * Root = Abs_A or else A = 0;", "log": ""} +{"name": "HumanEval_78_hex_key", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for Ch of Num loop\n case Ch is\n when '2' | '3' | '5' | '7' | 'B' | 'D' =>\n Count := Count + 1;\n when others => null;\n end case;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_79_decimal_to_binary", "outcome": "pass", "completion": " is\n Result : String (1 .. 32);\n Pos : Natural := 32;\n Value : Integer := abs Decimal;\n begin\n if Value = 0 then\n Result (Pos) := '0';\n Pos := Pos - 1;\n else\n while Value > 0 loop\n Result (Pos) := Character'Val (Value mod 2 + Character'Pos ('0'));\n Value := Value / 2;\n Pos := Pos - 1;\n end loop;\n end if;\n if Decimal < 0 then\n Result (Pos) := '-';\n Pos := Pos - 1;\n end if;\n return \"db\" & Result (Pos + 1 .. 32) & \"db\";", "log": ""} +{"name": "HumanEval_80_is_happy", "outcome": "pass", "completion": " is\n N : constant Natural := S'Length;\n begin\n if N < 3 then\n return False;\n end if;\n for I in S'First .. S'Last - 2 loop\n if S (I) = S (I + 1) or else S (I) = S (I + 2)\n or else S (I + 1) = S (I + 2)\n then\n return False;\n end if;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_81_numerical_letter_grade", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array (Grades'Range);\n begin\n for I in Grades'Range loop\n if Grades (I) >= 4.0 then\n Result (I) := To_Unbounded_String (\"A+\");\n elsif Grades (I) > 3.7 then\n Result (I) := To_Unbounded_String (\"A\");\n elsif Grades (I) > 3.3 then\n Result (I) := To_Unbounded_String (\"A-\");\n elsif Grades (I) > 3.0 then\n Result (I) := To_Unbounded_String (\"B+\");\n elsif Grades (I) > 2.7 then\n Result (I) := To_Unbounded_String (\"B\");\n elsif Grades (I) > 2.3 then\n Result (I) := To_Unbounded_String (\"B-\");\n elsif Grades (I) > 2.0 then\n Result (I) := To_Unbounded_String (\"C+\");\n elsif Grades (I) > 1.7 then\n Result (I) := To_Unbounded_String (\"C\");\n elsif Grades (I) > 1.3 then\n Result (I) := To_Unbounded_String (\"C-\");\n elsif Grades (I) > 1.0 then\n Result (I) := To_Unbounded_String (\"D+\");\n elsif Grades (I) > 0.7 then\n Result (I) := To_Unbounded_String (\"D\");\n elsif Grades (I) > 0.0 then\n Result (I) := To_Unbounded_String (\"D-\");\n else\n Result (I) := To_Unbounded_String (\"E\");\n end if;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:12:36: error: expected type \"Standard.Float\"\nmain.adb:12:36: error: found type universal integer\nmain.adb:12:44: error: expected type \"Standard.Float\"\nmain.adb:12:44: error: found type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_82_prime_length", "outcome": "pass", "completion": " is\n N : constant Natural := My_String'Length;\n begin\n if N < 2 then\n return False;\n end if;\n for I in 2 .. N / 2 loop\n if N mod I = 0 then\n return False;\n end if;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_83_starts_one_ends", "outcome": "runtime_error", "completion": " is\n Total : constant Integer := 9 ** N;\n Start_One : constant Integer := 9 ** (N - 1);\n End_One : constant Integer := 9 ** (N - 1);\n Both : constant Integer := 8 ** (N - 1);\n begin\n return Start_One + End_One - Both;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x408edf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40313c Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f9cb7eee248\n0x7f9cb7eee303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_84_solve", "outcome": "pass", "completion": " is\n Sum : Natural := 0;\n Temp : Integer := N;\n begin\n while Temp > 0 loop\n Sum := Sum + (Temp mod 10);\n Temp := Temp / 10;\n end loop;\n declare\n Result : String (1 .. 13) := [others => '0'];\n Idx : Positive := 13;\n Val : Natural := Sum;\n begin\n if Val = 0 then\n return \"0\";\n end if;\n while Val > 0 loop\n Result (Idx) := Character'Val (Character'Pos ('0') + Val mod 2);\n Val := Val / 2;\n Idx := Idx - 1;\n end loop;\n return Result (Idx + 1 .. 13);\n end;", "log": ""} +{"name": "HumanEval_85_add", "outcome": "runtime_error", "completion": " is\n Sum : Integer := 0;\n begin\n for I in Lst'Range loop\n if I mod 2 = 1 and then Lst (I) mod 2 = 0 then\n Sum := Sum + Lst (I);\n end if;\n end loop;\n return Sum;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408e1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40305d Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f0e7b5f2248\n0x7f0e7b5f2303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_86_anti_shuffle", "outcome": "runtime_error", "completion": " is\n Result : String := S;\n Start : Positive := S'First;\n begin\n for I in S'Range loop\n if S (I) = ' ' then\n declare\n Word : constant String := S (Start .. I - 1);\n begin\n for J in Word'Range loop\n for K in J + 1 .. Word'Last loop\n if Word (K) < Word (J) then\n declare\n Tmp : constant Character := Word (J);\n begin\n Result (Start + J - 1) := Word (K);\n Result (Start + K - 1) := Tmp;\n end;\n end if;\n end loop;\n end loop;\n end;\n Start := I + 1;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x409b1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40374f Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f7b0209b248\n0x7f7b0209b303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_87_get_row", "outcome": "pass", "completion": " is\n Result : Integer_Integer_Tuple_Array (1 .. Lst'Length * 10);\n Count : Natural := 0;\n begin\n for I in Lst'Range loop\n declare\n Row : constant Integer_Vector.Vector := Lst (I);\n begin\n for J in reverse Row.First_Index .. Row.Last_Index loop\n if Row (J) = X then\n Count := Count + 1;\n Result (Count) := (Integer_1 => I - Lst'First, Integer_2 => J - Row.First_Index);\n end if;\n end loop;\n end;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_88_sort_array", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array := My_Array;\n Sum : constant Integer := My_Array (Result'First) + My_Array (Result'Last);\n begin\n if Sum mod 2 = 0 then\n for I in Result'First .. Result'First + (Result'Length - 1) / 2 loop\n declare\n Temp : constant Integer := Result (I);\n begin\n Result (I) := Result (Result'Last - I + Result'First);\n Result (Result'Last - I + Result'First) := Temp;\n end;\n end loop;\n else\n for I in Result'First .. Result'First + (Result'Length - 1) / 2 loop\n declare\n Temp : constant Integer := Result (I);\n begin\n Result (I) := Result (Result'Last - I + Result'First);\n Result (Result'Last - I + Result'First) := Temp;\n end;\n end loop;\n end if;\n return Result;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:7:36 index check failed\nindex 1 not in 1..0\n[./main]\n0x4030a8 Placeholder.Sort_Array at placeholder.adb:7\n0x403867 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f8522cf3248\n0x7f8522cf3303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_89_encrypt", "outcome": "runtime_error", "completion": " is\n Result : String := S;\n begin\n for I in Result'Range loop\n if Result (I) in 'a' .. 'z' then\n declare\n Shifted : constant Character :=\n Character'Val (\n Character'Pos ('a') +\n ((Character'Pos (Result (I)) - Character'Pos ('a')) * 4 mod 26));\n begin\n Result (I) := Shifted;\n end;\n elsif Result (I) in 'A' .. 'Z' then\n declare\n Shifted : constant Character :=\n Character'Val (\n Character'Pos ('A') +\n ((Character'Pos (Result (I)) - Character'Pos ('A')) * 4 mod 26));\n begin\n Result (I) := Shifted;\n end;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40989f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032af Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f6c986c7248\n0x7f6c986c7303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_90_next_smallest", "outcome": "pass", "completion": " is\n Min1 : Integer := Integer'Last;\n Min2 : Integer := Integer'Last;\n begin\n for V of Lst loop\n if V < Min1 then\n Min2 := Min1;\n Min1 := V;\n elsif V > Min1 and then V < Min2 then\n Min2 := V;\n end if;\n end loop;\n if Min2 = Integer'Last then\n return (Valid => False);\n else\n return (Valid => True, Value => Min2);\n end if;", "log": ""} +{"name": "HumanEval_91_is_bored", "outcome": "runtime_error", "completion": " is\n Count : Natural := 0;\n In_Sent : Boolean := False;\n Start_Of : Positive := S'First;\n begin\n for I in S'Range loop\n if S (I) = '.' or else S (I) = '?' or else S (I) = '!' then\n In_Sent := False;\n end if;\n if not In_Sent and then I > Start_Of + 1 and then S (I - 1) = ' ' and then S (Start_Of) = 'I' then\n Count := Count + 1;\n end if;\n if S (I) /= ' ' then\n Start_Of := I;\n end if;\n if S (I) = '.' or else S (I) = '?' or else S (I) = '!' then\n In_Sent := True;\n end if;\n end loop;\n return Count;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:15\n[./main]\n0x40909f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403375 Main at main.adb:15\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7ff62c91f248\n0x7ff62c91f303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_92_any_int", "outcome": "compile_error", "completion": " is\n A : constant Integer := Integer (X);\n B : constant Integer := Integer (Y);\n C : constant Integer := Integer (Z);\n begin\n return ((A = B + C) or else (B = A + C) or else (C = A + B))\n and then X = Float (A)\n and then Y = Float (B)\n and then Z = Float (C);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:11:30: error: expected type \"Standard.Float\"\nmain.adb:11:30: error: found type universal integer\nmain.adb:12:35: error: expected type \"Standard.Float\"\nmain.adb:12:35: error: found type universal integer\nmain.adb:13:35: error: expected type \"Standard.Float\"\nmain.adb:13:35: error: found type universal integer\nmain.adb:14:30: error: expected type \"Standard.Float\"\nmain.adb:14:30: error: found type universal integer\nmain.adb:15:30: error: expected type \"Standard.Float\"\nmain.adb:15:30: error: found type universal integer\nmain.adb:17:30: error: expected type \"Standard.Float\"\nmain.adb:17:30: error: found type universal integer\nmain.adb:18:30: error: expected type \"Standard.Float\"\nmain.adb:18:30: error: found type universal integer\nmain.adb:19:30: error: expected type \"Standard.Float\"\nmain.adb:19:30: error: found type universal integer\nmain.adb:20:35: error: expected type \"Standard.Float\"\nmain.adb:20:35: error: found type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_93_encode", "outcome": "runtime_error", "completion": " is\n Result : String := Message;\n begin\n for I in Result'Range loop\n if Result (I) >= 'a' and then Result (I) <= 'z' then\n Result (I) := Character'Val (Character'Pos ('A') +\n (Character'Pos (Result (I)) - Character'Pos ('a')));\n elsif Result (I) >= 'A' and then Result (I) <= 'Z' then\n Result (I) := Character'Val (Character'Pos ('a') +\n (Character'Pos (Result (I)) - Character'Pos ('A')));\n end if;\n case Result (I) is\n when 'a' => Result (I) := 'C';\n when 'e' => Result (I) := 'G';\n when 'i' => Result (I) := 'K';\n when 'o' => Result (I) := 'Q';\n when 'u' => Result (I) := 'W';\n when others => null;\n end case;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40959f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403339 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7ff42b7ae248\n0x7ff42b7ae303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_94_skjkasdkd", "outcome": "pass", "completion": " is\n function Is_Prime (N : Natural) return Boolean is\n I : Positive := 2;\n begin\n if N <= 1 then\n return False;\n end if;\n while I * I <= N loop\n if N mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;\n end Is_Prime;\n\n Best : Natural := 0;\n begin\n for V of Lst loop\n if Is_Prime (abs (V)) and then abs (V) > Best then\n Best := abs (V);\n end if;\n end loop;\n if Best = 0 then\n return 0;\n end if;\n declare\n Sum : Natural := 0;\n Tmp : Natural := Best;\n begin\n while Tmp > 0 loop\n Sum := Sum + Tmp mod 10;\n Tmp := Tmp / 10;\n end loop;\n return Sum;\n end;", "log": ""} +{"name": "HumanEval_95_check_dict_case", "outcome": "runtime_error", "completion": " is\n Lower_Count : Natural := 0;\n Upper_Count : Natural := 0;\n Total : Natural := 0;\n begin\n for C in Dict.Iterate loop\n declare\n Key : constant String := String_String_Dict.Key (C);\n begin\n Total := Total + 1;\n if Key'Length > 0 then\n if Key (Key'First) >= 'a' and then Key (Key'First) <= 'z' then\n Lower_Count := Lower_Count + 1;\n elsif Key (Key'First) >= 'A' and then Key (Key'First) <= 'Z' then\n Upper_Count := Upper_Count + 1;\n end if;\n end if;\n end;\n end loop;\n return (Lower_Count = Total or else Upper_Count = Total)\n and then Total > 0;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:16\n[./main]\n0x41b45f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4122d1 Main at main.adb:16\n0x40341d Main at b~main.adb:261\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7ff2e26f0248\n0x7ff2e26f0303\n[./main]\n0x402e3f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_96_count_up_to", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. N);\n Count : Natural := 0;\n begin\n if N <= 0 then\n return [];\n end if;\n for I in 2 .. N loop\n declare\n Is_Prime : Boolean := True;\n begin\n for J in 2 .. I / 2 loop\n if I mod J = 0 then\n Is_Prime := False;\n exit;\n end if;\n end loop;\n if Is_Prime then\n Count := Count + 1;\n Result (Count) := I;\n end if;\n end;\n end loop;\n return Result (1 .. Count);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x4099df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403261 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f24cbb1a248\n0x7f24cbb1a303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_97_multiply", "outcome": "pass", "completion": " is\n Unit_A : constant Integer := abs (A mod 10);\n Unit_B : constant Integer := abs (B mod 10);\n begin\n return Unit_A * Unit_B;", "log": ""} +{"name": "HumanEval_98_count_upper", "outcome": "runtime_error", "completion": " is\n Result : Integer := 0;\n begin\n for I in S'Range loop\n if I mod 2 = 0 then\n case S (I) is\n when 'A' | 'E' | 'I' | 'O' | 'U' =>\n Result := Result + 1;\n when others => null;\n end case;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408f5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40303e Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f2a6824a248\n0x7f2a6824a303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_99_closest_integer", "outcome": "pass", "completion": " is\n V : constant Float := Float'Value (Value);\n begin\n if V >= 0.0 then\n return Integer (Float'Floor (V + 0.5));\n else\n return Integer (Float'Ceiling (V - 0.5));\n end if;", "log": ""} +{"name": "HumanEval_100_make_a_pile", "outcome": "pass", "completion": " is\n Result : Integer_Array (1 .. N);\n Current : Integer := N;\n begin\n for I in 1 .. N loop\n Result (I) := Current;\n if N mod 2 = 0 then\n Current := Current + 2;\n else\n Current := Current + 2;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_101_words_string", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. 64);\n Count : Natural := 0;\n I : Positive := S'First;\n begin\n while I <= S'Last loop\n if S (I) = ' ' or else S (I) = ',' then\n I := I + 1;\n elsif I <= S'Last then\n declare\n J : Positive := I;\n begin\n while J <= S'Last and then S (J) /= ' ' and then S (J) /= ',' loop\n J := J + 1;\n end loop;\n Count := Count + 1;\n Result (Count) := To_Unbounded_String (S (I .. J - 1));\n I := J;\n end;\n end if;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_102_choose_num", "outcome": "pass", "completion": " is\n Result : Integer := -1;\n begin\n if X > Y then\n return Result;\n end if;\n for I in reverse X .. Y loop\n if I mod 2 = 0 then\n Result := I;\n exit;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_104_unique_digits", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. X'Length);\n Count : Natural := 0;\n begin\n for V of X loop\n declare\n Temp : Positive := V;\n begin\n while Temp > 0 loop\n if (Temp mod 10) mod 2 = 0 then\n goto Skip;\n end if;\n Temp := Temp / 10;\n end loop;\n Count := Count + 1;\n Result (Count) := V;\n end;\n <>\n null;\n end loop;\n return Result (1 .. Count);", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:17:29 range check failed\nvalue 0 not in 1..2147483647\n[./main]\n0x403122 Placeholder.Unique_Digits at placeholder.adb:17\n0x4032d9 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7eff470ac248\n0x7eff470ac303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_105_by_length", "outcome": "runtime_error", "completion": " is\n Result : Unbounded_String_Array (1 .. Arr'Length);\n Count : Natural := 0;\n begin\n for I in Arr'Range loop\n if Arr (I) >= 1 and Arr (I) <= 9 then\n Count := Count + 1;\n Result (Count) := To_Unbounded_String (Natural'Image (Arr (I)));\n end if;\n end loop;\n -- Reverse the result\n declare\n Reversed : Unbounded_String_Array (1 .. Count);\n begin\n for I in 1 .. Count loop\n Reversed (I) := Result (Count - I + 1);\n end loop;\n return Reversed;\n end;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x41475f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x405c2d Main at main.adb:12\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f34e23b3248\n0x7f34e23b3303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_106_f", "outcome": "pass", "completion": " is\n Result : Integer_Array (1 .. N);\n Fact : Integer := 1;\n Sum : Integer := 0;\n begin\n for I in 1 .. N loop\n if I mod 2 = 0 then\n Fact := 1;\n for J in 1 .. I loop\n Fact := Fact * J;\n end loop;\n Result (I) := Fact;\n else\n Sum := 0;\n for J in 1 .. I loop\n Sum := Sum + J;\n end loop;\n Result (I) := Sum;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_107_even_odd_palindrome", "outcome": "compile_error", "completion": " is\n Result : Integer_Integer_Tuple := (Integer_1 => 0, Integer_2 => 0);\n begin\n for I in 1 .. N loop\n declare\n S : constant String := Integer'Image (I);\n begin\n if S = Reverse (S) then\n if I mod 2 = 0 then\n Result.Integer_1 := Result.Integer_1 + 1;\n else\n Result.Integer_2 := Result.Integer_2 + 1;\n end if;\n end if;\n end;\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:38:20: error: reserved word \"reverse\" cannot be used as identifier\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_108_count_nums", "outcome": "runtime_error", "completion": " is\n Result : Natural := 0;\n begin\n for V of Arr loop\n declare\n Sum : Integer := 0;\n Abs_V : constant Integer :=\n (if V >= 0 then V else -V);\n Remaining : Natural := Abs_V;\n begin\n while Remaining > 0 loop\n Sum := Sum + (Remaining mod 10);\n Remaining := Remaining / 10;\n end loop;\n if Sum > 0 then\n Result := Result + 1;\n end if;\n end;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x4090df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40318b Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7faef374b248\n0x7faef374b303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_109_move_one_ball", "outcome": "runtime_error", "completion": " is\n Count : Natural := 0;\n Prev : Integer := Arr (Arr'Last);\n begin\n for I in Arr'First .. Arr'Last - 1 loop\n if Arr (I) < Prev then\n Count := Count + 1;\n end if;\n Prev := Arr (I);\n end loop;\n if Arr (Arr'First) < Arr (Arr'Last) then\n Count := Count + 1;\n end if;\n return Count <= 1;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:7:26 index check failed\nindex 0 not in 1..2147483647\n[./main]\n0x402fa1 Placeholder.Move_One_Ball at placeholder.adb:7\n0x403295 Main at main.adb:15\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fe210cb5248\n0x7fe210cb5303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_110_exchange", "outcome": "runtime_error", "completion": " is\n Odd_Count : Natural := 0;\n begin\n for I in Lst1'Range loop\n if Lst1 (I) mod 2 /= 0 then\n Odd_Count := Odd_Count + 1;\n end if;\n end loop;\n for I in Lst2'Range loop\n if Lst2 (I) mod 2 = 0 then\n Odd_Count := Odd_Count - 1;\n end if;\n end loop;\n if Odd_Count <= 0 then\n return \"YES\";\n else\n return \"NO\";\n end if;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:15:36 range check failed\nvalue -1 not in 0..2147483647\n[./main]\n0x403051 Placeholder.Exchange at placeholder.adb:15\n0x403762 Main at main.adb:17\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f4cc0324248\n0x7f4cc0324303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_111_histogram", "outcome": "compile_error", "completion": " is\n Result : String_Integer_Dict.Map;\n Count : Natural := 0;\n Temp : Integer;\n begin\n for I in Test'Range loop\n if Test (I) = ' ' then\n if Count > 0 then\n declare\n Key : constant String := Test (Test'First .. I - 1);\n begin\n if not Result.Contains (Key) then\n Result.Insert (Key, Count);\n else\n Temp := Result.Element (Key);\n if Count > Temp then\n Result.Replace_Element (Key, Count);\n end if;\n end if;\n end;\n Count := 0;\n end if;\n else\n Count := Count + 1;\n end if;\n end loop;\n if Count > 0 then\n declare\n Key : constant String := Test (Test'First .. Test'Last);\n begin\n if not Result.Contains (Key) then\n Result.Insert (Key, Count);\n else\n Temp := Result.Element (Key);\n if Count > Temp then\n Result.Replace_Element (Key, Count);\n end if;\n end if;\n end;\n end if;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:22:49: error: expected private type \"Ada.Containers.Indefinite_Ordered_Maps.Cursor\" from instance at placeholder.ads:5\nplaceholder.adb:22:49: error: found type \"Standard.String\"\nplaceholder.adb:41:43: error: expected private type \"Ada.Containers.Indefinite_Ordered_Maps.Cursor\" from instance at placeholder.ads:5\nplaceholder.adb:41:43: error: found type \"Standard.String\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_112_reverse_delete", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String := Null_Unbounded_String;\n Is_Palindrome : Boolean := True;\n begin\n for Ch of S loop\n if not (C contains Ch) then\n Append (Result, Ch);\n end if;\n end loop;\n declare\n Rev : constant String := Reverse (To_String (Result));\n begin\n for I in 1 .. Natural'Min (Length (Result), Length (Rev)) / 2 loop\n if Element (Result, I) /= Element (Rev, I) then\n Is_Palindrome := False;\n exit;\n end if;\n end loop;\n end;\n return (Unbounded_String_1 => Result, Boolean_2 => Is_Palindrome);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:35:19: error: binary operator expected\nprogram.ada:40:35: error: reserved word \"reverse\" cannot be used as identifier\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_113_odd_count", "outcome": "runtime_error", "completion": " is\n Result : Unbounded_String_Array (Lst'Range);\n begin\n for I in Lst'Range loop\n declare\n S : constant String := To_String (Lst (I));\n Count : Natural := 0;\n begin\n for C of S loop\n if Character'Pos (C) mod 2 = 1 then\n Count := Count + 1;\n end if;\n end loop;\n Result (I) := To_Unbounded_String (\n \"the number of odd elements\" & Count'Image &\n \"n the str\" & Count'Image & \"ng\" & Count'Image &\n \" of the \" & Count'Image & \"nput.\");\n end;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x413c9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40540a Main at main.adb:12\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f1c4cf48248\n0x7f1c4cf48303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_114_minSubArraySum", "outcome": "compile_error", "completion": " is\n Current_Min : Integer := Nums (Nums'First);\n Global_Min : Integer := Nums (Nums'First);\n begin\n for I in Nums'First + 1 .. Nums'Last loop\n if Nums (I) < Current_Min + Nums (I) then\n Current_Min := Nums (I);\n else\n Current_Min := Current_Min + Nums (I);\n end if;\n if Current_Min < Global_Min then\n Global_Min := Current_Min;\n end if;\n end loop;\n return Global_Min;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:14:31: error: value not in range of type \"Standard.Integer\"\nmain.adb:14:31: error: static expression fails Constraint_Check\nmain.adb:14:53: error: value not in range of type \"Standard.Integer\"\nmain.adb:14:53: error: static expression fails Constraint_Check\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_115_max_fill", "outcome": "pass", "completion": " is\n Total : Natural := 0;\n begin\n for Well of Grid loop\n declare\n Water : Natural := 0;\n begin\n for Unit of Well loop\n if Unit = 1 then\n Water := Water + 1;\n end if;\n end loop;\n Total := Total + (Water + Capacity - 1) / Capacity;\n end;\n end loop;\n return Total;", "log": ""} +{"name": "HumanEval_116_sort_array", "outcome": "runtime_error", "completion": " is\n pragma Unreferenced (Arr);\n begin\n return Arr;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x4096df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4030ec Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fd36604f248\n0x7fd36604f303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_117_select_words", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. S'Length);\n Count : Natural := 0;\n Word : Unbounded_String;\n Consonant_Count : Natural;\n begin\n for I in S'Range loop\n if S (I) = ' ' then\n if Length (Word) > 0 then\n Consonant_Count := 0;\n for J in To_String (Word)'Range loop\n declare\n C : constant Character := To_String (Word) (J);\n begin\n if C /= 'A' and then C /= 'E' and then C /= 'I'\n and then C /= 'O' and then C /= 'U'\n and then C /= 'a' and then C /= 'e'\n and then C /= 'i' and then C /= 'o'\n and then C /= 'u'\n then\n Consonant_Count := Consonant_Count + 1;\n end if;\n end;\n end loop;\n if Consonant_Count = N then\n Count := Count + 1;\n Result (Count) := Word;\n end if;\n Word := Null_Unbounded_String;\n end if;\n else\n Append (Word, S (I));\n end if;\n end loop;\n if Length (Word) > 0 then\n Consonant_Count := 0;\n for J in To_String (Word)'Range loop\n declare\n C : constant Character := To_String (Word) (J);\n begin\n if C /= 'A' and then C /= 'E' and then C /= 'I'\n and then C /= 'O' and then C /= 'U'\n and then C /= 'a' and then C /= 'e'\n and then C /= 'i' and then C /= 'o'\n and then C /= 'u'\n then\n Consonant_Count := Consonant_Count + 1;\n end if;\n end;\n end loop;\n if Consonant_Count = N then\n Count := Count + 1;\n Result (Count) := Word;\n end if;\n end if;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_118_get_closest_vowel", "outcome": "compile_error", "completion": " is\n Vowels : constant String := \"aeiouAEIOU\";\n Result : Natural := 0;\n begin\n for I in reverse Word'First + 1 .. Word'Last - 1 loop\n if Vowels (Vowels'First .. Vowels'First) not in Word (I)\n and then Vowels (Vowels'First .. Vowels'First) not in Word (I - 1)\n and then Vowels (Vowels'First .. Vowels'First) not in Word (I + 1)\n then\n Result := I;\n exit;\n end if;\n end loop;\n if Result = 0 then\n return \"\";\n else\n return Word (Result .. Result);\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:10:58: error: subtype mark required in this context\nplaceholder.adb:11:66: error: subtype mark required in this context\nplaceholder.adb:12:66: error: subtype mark required in this context\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_119_match_parens", "outcome": "runtime_error", "completion": " is\n Open_Count : Natural := 0;\n Close_Count : Natural := 0;\n begin\n for I in Lst'Range loop\n declare\n S : constant String := To_String (Lst (I));\n begin\n for C of S loop\n if C = '(' then\n Open_Count := Open_Count + 1;\n elsif C = ')' then\n Close_Count := Close_Count + 1;\n end if;\n end loop;\n end;\n end loop;\n if Open_Count = Close_Count then\n return \"Yes\";\n else\n return \"No\";\n end if;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:21\n[./main]\n0x4150df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x405d09 Main at main.adb:21\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f60798af248\n0x7f60798af303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_120_maximum", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. K);\n Temp : Integer_Array := Arr;\n Idx : Positive;\n Max_Val : Integer;\n begin\n if K = 0 then\n return [];\n end if;\n for I in 1 .. K loop\n Max_Val := Integer'First;\n Idx := 0;\n for J in Temp'Range loop\n if Temp (J) > Max_Val then\n Max_Val := Temp (J);\n Idx := J;\n end if;\n end loop;\n Result (I) := Max_Val;\n Temp (Idx) := Integer'First;\n end loop;\n return Result;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:16 range check failed\n[./main]\n0x403158 Placeholder.Maximum at placeholder.adb:16\n0x403240 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f8157da5248\n0x7f8157da5303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_121_solution", "outcome": "runtime_error", "completion": " is\n Sum : Integer := 0;\n begin\n for I in Lst'Range loop\n if I mod 2 = 0 and then Lst (I) mod 2 /= 0 then\n Sum := Sum + Lst (I);\n end if;\n end loop;\n return Sum;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408f5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403054 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fcbf0a28248\n0x7fcbf0a28303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_122_add_elements", "outcome": "runtime_error", "completion": " is\n Sum : Integer := 0;\n begin\n for I in Arr'First .. Positive'Min (Arr'Last, Arr'First + K - 1) loop\n if abs Arr (I) < 100 then\n Sum := Sum + Abs Arr (I);\n end if;\n end loop;\n return Sum;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408fdf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403162 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7ff90a53b248\n0x7ff90a53b303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_123_get_odd_collatz", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. N);\n Count : Natural := 0;\n Current : Positive := N;\n begin\n while Current /= 1 loop\n if Current mod 2 = 1 then\n Count := Count + 1;\n Result (Count) := Current;\n end if;\n if Current mod 2 = 0 then\n Current := Current / 2;\n else\n Current := Current * 3 + 1;\n end if;\n end loop;\n Result (Count + 1) := 1;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40935f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032c7 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f081ad88248\n0x7f081ad88303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_124_valid_date", "outcome": "runtime_error", "completion": " is\n function Is_Digit (C : Character) return Boolean is\n (Character'Pos (C) >= Character'Pos ('0')\n and then Character'Pos (C) <= Character'Pos ('9'));\n function Parse_Int (S : String) return Natural is\n Result : Natural := 0;\n begin\n for C of S loop\n if Is_Digit (C) then\n Result := Result * 10 + (Character'Pos (C)\n - Character'Pos ('0'));\n end if;\n end loop;\n return Result;\n end Parse_Int;\n begin\n if Date'Length < 10 then\n return False;\n end if;\n if Date (Date'First) /= '0'\n or else Date (Date'First + 1) /= '1'\n or else Date (Date'First + 2) /= '-'\n then\n return False;\n end if;\n declare\n Month : constant Natural := Parse_Int (Date (Date'First .. Date'First + 1));\n Day : constant Natural := Parse_Int (Date (Date'First + 4 .. Date'First + 5));\n Year : constant Natural := Parse_Int (Date (Date'First + 8 .. Date'Last));\n begin\n if Month = 0 or else Month > 12 then\n return False;\n end if;\n if Day = 0 or else Day > 31 then\n return False;\n end if;\n if Month in 4 | 6 | 9 | 11 and then Day > 30 then\n return False;\n end if;\n if Month = 2 and then Day > 29 then\n return False;\n end if;\n return True;\n end;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40975f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403440 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7ff1c1138248\n0x7ff1c1138303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_126_is_sorted", "outcome": "runtime_error", "completion": " is\n Prev : Integer := Lst (Lst'First);\n begin\n for I in Lst'First + 1 .. Lst'Last loop\n if Lst (I) < Prev then\n return False;\n end if;\n Prev := Lst (I);\n end loop;\n return True;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:6:25 index check failed\nindex 1 not in -2147483648..0\n[./main]\n0x402f9a Placeholder.Is_Sorted at placeholder.adb:6\n0x40330e Main at main.adb:17\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f6f35a35248\n0x7f6f35a35303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_127_intersection", "outcome": "compile_error", "completion": " is\n Start : constant Integer := Integer'Max (Interval1.Integer_1, Interval2.Integer_1);\n End_ : constant Integer := Integer'Min (Interval1.Integer_2, Interval2.Integer_2);\n begin\n if Start > End_ then\n return \"NO\";\n end if;\n declare\n Length : constant Natural := End_ - Start + 1;\n begin\n for I in 2 .. Length / 2 loop\n if Length mod I = 0 then\n return \"NO\";\n end if;\n end loop;\n return \"YES\";\n end;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:37:10: error: identifier cannot end with underline\nprogram.ada:39:21: error: identifier cannot end with underline\nprogram.ada:43:42: error: identifier cannot end with underline\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_128_prod_signs", "outcome": "compile_error", "completion": " is\n Sum_Mags : Integer := 0;\n Prod : Integer := 1;\n begin\n if Arr'Length = 0 then\n return (Valid => False);\n end if;\n for I in Arr'Range loop\n Sum_Mags := Sum_Mags + abs (Arr (I));\n if Arr (I) > 0 then\n Prod := Prod * 1;\n elsif Arr (I) < 0 then\n Prod := Prod * -1;\n else\n return (Valid => True, Value => 0);\n end if;\n end loop;\n return (Valid => True, Value => Sum_Mags * Prod);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:43:28: error: parentheses required for unary minus\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_129_minPath", "outcome": "compile_error", "completion": " is\n Result : Integer_Array := [others => 0];\n begin\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:7:34: error: \"others\" choice not allowed here\nplaceholder.adb:7:34: error: qualify the aggregate with a constrained subtype to provide bounds for it\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_130_tri", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. N + 1);\n begin\n for I in 1 .. N + 1 loop\n if I = 1 then\n Result (I) := 3;\n elsif I mod 2 = 0 then\n Result (I) := 1 + I / 2;\n else\n Result (I) := Result (I - 1) + Result (I - 2) + Result (I + 1);\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x409b1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033f1 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fe75cbb9248\n0x7fe75cbb9303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_131_digits", "outcome": "compile_error", "completion": " is\n Product : Integer := 1;\n Has_Odd : Boolean := False;\n Abs_N : constant Integer := abs N;\n begin\n for Digit in reverse Integer'Image (Abs_N)'Range loop\n declare\n D : constant Integer :=\n Character'Pos (Integer'Image (Abs_N)(Digit)) - Character'Pos ('0');\n begin\n if D mod 2 = 1 then\n Product := Product * D;\n Has_Odd := True;\n end if;\n end;\n end loop;\n if not Has_Odd then\n return 0;\n else\n return Product;\n end if;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:4:13: error: reserved word \"digits\" cannot be used as identifier\nprogram.ada:41:04: error: \"end Digits;\" expected\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_132_is_nested", "outcome": "runtime_error", "completion": " is\n Depth : Natural := 0;\n Nested : Boolean := False;\n begin\n for C of My_String loop\n case C is\n when '[' => Depth := Depth + 1;\n when ']' =>\n if Depth > 0 then\n Depth := Depth - 1;\n Nested := True;\n end if;\n when others => null;\n end case;\n end loop;\n return Nested and then Depth = 0;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x40929f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40312e Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fd0755a3248\n0x7fd0755a3303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_133_sum_squares", "outcome": "pass", "completion": " is\n Total : Integer := 0;\n begin\n for V of Lst loop\n declare\n Rounded : constant Integer :=\n Integer (Float'Ceiling (V));\n begin\n Total := Total + Rounded * Rounded;\n end;\n end loop;\n return Total;", "log": ""} +{"name": "HumanEval_134_check_if_last_char_is_a_letter", "outcome": "pass", "completion": " is\n Last : constant Natural := Txt'Last;\n begin\n if Last < Txt'First then\n return False;\n end if;\n if not (Txt (Last) in 'a' .. 'z' | 'A' .. 'Z') then\n return False;\n end if;\n if Last > Txt'First and then\n (Txt (Last - 1) in 'a' .. 'z' | 'A' .. 'Z')\n then\n return False;\n end if;\n return True;", "log": ""} +{"name": "HumanEval_135_can_arrange", "outcome": "runtime_error", "completion": " is\n Result : Integer := -1;\n begin\n for I in Arr'First .. Arr'Last - 1 loop\n if Arr (I + 1) < Arr (I) then\n Result := I + 1;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408f1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4030e3 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f5c7b0a9248\n0x7f5c7b0a9303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_136_largest_smallest_integers", "outcome": "pass", "completion": " is\n Neg_Max : Integer_Option;\n Pos_Min : Integer_Option;\n begin\n for V of Lst loop\n if V < 0 then\n if not Neg_Max.Valid or else V > Neg_Max.Value then\n Neg_Max := (True, V);\n end if;\n elsif V > 0 then\n if not Pos_Min.Valid or else V < Pos_Min.Value then\n Pos_Min := (True, V);\n end if;\n end if;\n end loop;\n return (Neg_Max, Pos_Min);", "log": ""} +{"name": "HumanEval_138_is_equal_to_sum_even", "outcome": "pass", "completion": " is\n Remaining : Natural := N;\n begin\n if Remaining < 8 then\n return False;\n end if;\n for I in 1 .. 3 loop\n Remaining := Remaining - 2;\n end loop;\n return Remaining mod 2 = 0;", "log": ""} +{"name": "HumanEval_139_special_factorial", "outcome": "compile_error", "completion": " is\n Result : Integer := 1;\n Factorial : Integer := 1;\n begin\n for I in 1 .. N loop\n Factorial := Factorial * I;\n Result := Result * Factorial;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:13:35: error: value not in range of type \"Standard.Integer\"\nmain.adb:13:35: error: static expression fails Constraint_Check\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_140_fix_spaces", "outcome": "runtime_error", "completion": " is\n Result : String := Text;\n Count : Natural := 0;\n begin\n for I in Result'Range loop\n if Result (I) = ' ' then\n Count := Count + 1;\n if Count > 2 then\n Result (I) := '-';\n end if;\n else\n Count := 0;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x40945f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032f2 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f7a789e7248\n0x7f7a789e7303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_141_file_name_check", "outcome": "runtime_error", "completion": " is\n Digits_Count : Natural := 0;\n Dot_Pos : Natural := 0;\n begin\n for I in File_Name'Range loop\n if File_Name (I) in '0' .. '9' then\n Digits_Count := Digits_Count + 1;\n end if;\n if File_Name (I) = '.' then\n Dot_Pos := I;\n end if;\n end loop;\n if Dot_Pos = 0 or else Dot_Pos = File_Name'First or else Dot_Pos = File_Name'Last then\n return \"No\";\n end if;\n declare\n Before_Dot : constant String :=\n File_Name (File_Name'First .. Dot_Pos - 1);\n After_Dot : constant String :=\n File_Name (Dot_Pos + 1 .. File_Name'Last);\n begin\n if Before_Dot'Length > 1 and then Before_Dot (Before_Dot'First) in 'a' .. 'z' | 'A' .. 'Z' then\n if After_Dot = \"txt\" or else After_Dot = \"exe\" or else After_Dot = \"dll\" then\n if Digits_Count <= 3 then\n return \"Yes\";\n end if;\n end if;\n end if;\n end;\n return \"No\";", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:14\n[./main]\n0x40b15f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4037ea Main at main.adb:14\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7ff3b4f6a248\n0x7ff3b4f6a303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_142_sum_squares", "outcome": "runtime_error", "completion": " is\n Result : Integer := 0;\n begin\n for I in Lst'Range loop\n declare\n V : constant Integer := Lst (I);\n begin\n if I mod 3 = 0 then\n Result := Result + V * V;\n elsif I mod 4 = 0 then\n Result := Result + V * V * V;\n else\n Result := Result + V;\n end if;\n end;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40925f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40315a Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f0f59521248\n0x7f0f59521303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_143_words_in_sentence", "outcome": "compile_error", "completion": " is\n Result : String (1 .. Sentence'Length);\n Len : Natural := 0;\n I : Positive := Sentence'First;\n begin\n while I <= Sentence'Last loop\n if Sentence (I) = ' ' then\n I := I + 1;\n else\n declare\n J : Positive := I;\n begin\n while J <= Sentence'Last and then Sentence (J) /= ' ' loop\n J := J + 1;\n end loop;\n if Is_Prime (J - I) then\n declare\n Word_Len : constant Natural := J - I;\n begin\n Len := Len + 1;\n Result (Len .. Len + Word_Len - 1) :=\n Sentence (I .. J - 1);\n end;\n end if;\n I := J;\n end;\n end if;\n end loop;\n return Result (1 .. Len);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:20:19: error: \"Is_Prime\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_144_simplify", "outcome": "compile_error", "completion": " is\n procedure Parse_Fraction (S : String; Num, Den : out Natural) is\n Slash_Pos : constant Natural := S'Index ('/');\n begin\n Num := Natural'Value (S (S'First .. Slash_Pos - 1));\n Den := Natural'Value (S (Slash_Pos + 1 .. S'Last));\n end Parse_Fraction;\n X_Num, X_Den, N_Num, N_Den : Natural;\n begin\n Parse_Fraction (X, X_Num, X_Den);\n Parse_Fraction (N, N_Num, N_Den);\n return (X_Num * N_Num) mod (X_Den * N_Den) = 0;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:7:51: error: unexpected argument for \"Index\" attribute\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_145_order_by_points", "outcome": "compile_error", "completion": " is\n type Pair is record\n Value : Integer;\n Index : Positive;\n end record;\n type Pair_Array is array (Positive range <>) of Pair;\n Pairs : Pair_Array (1 .. Nums'Length);\n Result : Integer_Array (Nums'Range);\n begin\n for I in Nums'Range loop\n Pairs (I) := (Value => Nums (I), Index => I);\n end loop;\n declare\n use Ada.Containers;\n package PA is new Counted_Sort.Pair_Array (Pair_Array);\n begin\n PA.Sort (Pairs);\n end;\n for I in Nums'Range loop\n Result (I) := Pairs (I).Value;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:18:14: error: \"Ada\" is undefined\nplaceholder.adb:18:14: error: missing \"with Ada.Containers;\"\nplaceholder.adb:19:28: error: \"Counted_Sort\" is undefined\nplaceholder.adb:21:10: error: \"PA\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_146_specialFilter", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for N of Nums loop\n if N > 10 then\n declare\n Abs_N : constant Integer := abs (N);\n First_Digit : Positive;\n Last_Digit : constant Natural := Abs_N mod 10;\n begin\n First_Digit := Abs_N / 10;\n while First_Digit >= 10 loop\n First_Digit := First_Digit / 10;\n end loop;\n if First_Digit mod 2 = 1 and Last_Digit mod 2 = 1 then\n Count := Count + 1;\n end if;\n end;\n end if;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_147_get_max_triples", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for I in 1 .. N loop\n declare\n A_I : constant Integer := I * I - I + 1;\n begin\n for J in I + 1 .. N loop\n declare\n A_J : constant Integer := J * J - J + 1;\n begin\n for K in J + 1 .. N loop\n declare\n A_K : constant Integer := K * K - K + 1;\n begin\n if (A_I + A_J + A_K) mod 3 = 0 then\n Count := Count + 1;\n end if;\n end;\n end loop;\n end;\n end loop;\n end;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_148_bf", "outcome": "compile_error", "completion": " is\n Planets : constant array (1 .. 8) of Unbounded_String :=\n [To_Unbounded_String (\"Mercury\"),\n To_Unbounded_String (\"Venus\"),\n To_Unbounded_String (\"Earth\"),\n To_Unbounded_String (\"Mars\"),\n To_Unbounded_String (\"Jupiter\"),\n To_Unbounded_String (\"Saturn\"),\n To_Unbounded_String (\"Uranus\"),\n To_Unbounded_String (\"Neptune\")];\n Idx1 : Natural := 0;\n Idx2 : Natural := 0;\n Result : Unbounded_String_Array (1 .. 7);\n Count : Natural := 0;\n begin\n for I in Planets'Range loop\n if To_String (Planets (I)) = Planet1 then\n Idx1 := I;\n end if;\n if To_String (Planets (I)) = Planet2 then\n Idx2 := I;\n end if;\n end loop;\n if Idx1 = 0 or else Idx2 = 0 then\n return [];\n end if;\n if Idx1 > Idx2 then\n declare\n Tmp : constant Natural := Idx1;\n begin\n Idx1 := Idx2;\n Idx2 := Tmp;\n end;\n end if;\n for I in Idx1 + 1 .. Idx2 - 1 loop\n Count := Count + 1;\n Result (Count) := Planets (I);\n end loop;\n return Result (1 .. Count);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:87:51: error: missing operand\nprogram.ada:88:50: error: missing operand\nprogram.ada:89:56: error: missing operand\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_149_sorted_list_sum", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. Lst'Length);\n Count : Natural := 0;\n begin\n for I in Lst'Range loop\n if Length (Lst (I)) mod 2 = 0 then\n Count := Count + 1;\n Result (Count) := Lst (I);\n end if;\n end loop;\n for I in 1 .. Count - 1 loop\n for J in I + 1 .. Count loop\n if Length (Result (J)) < Length (Result (I)) or else\n (Length (Result (J)) = Length (Result (I)) and then\n Element (Result (J), 1) < Element (Result (I), 1))\n then\n declare\n Temp : constant Unbounded_String := Result (I);\n begin\n Result (I) := Result (J);\n Result (J) := Temp;\n end;\n end if;\n end loop;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_150_x_or_y", "outcome": "pass", "completion": " is\n function Is_Prime (V : Positive) return Boolean is\n I : Natural := 2;\n begin\n if V = 1 then\n return False;\n end if;\n while I * I <= V loop\n if V mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;\n end Is_Prime;\n begin\n if N > 1 and then Is_Prime (N) then\n return X;\n else\n return Y;\n end if;", "log": ""} +{"name": "HumanEval_151_double_the_difference", "outcome": "compile_error", "completion": " is\n Sum : Integer := 0;\n begin\n for V of Lst loop\n if V >= 0 and then V = Float (Integer (V)) and then Integer (V) mod 2 /= 0 then\n Sum := Sum + Integer (V * V);\n end if;\n end loop;\n return Sum;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:9:15: error: invalid operand types for operator \">=\"\nplaceholder.adb:9:15: error: left operand has type \"Standard.Float\"\nplaceholder.adb:9:15: error: right operand has type universal integer\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_152_compare", "outcome": "pass", "completion": " is\n Result : Integer_Array (Guess'Range);\n begin\n for I in Guess'Range loop\n if abs (Game (I) - Guess (I)) = 0 then\n Result (I) := 0;\n else\n Result (I) := abs (Game (I) - Guess (I));\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_153_Strongest_Extension", "outcome": "pass", "completion": " is\n Best_Strength : Integer := Integer'First;\n Best_Index : Positive := Extensions'First;\n begin\n for I in Extensions'Range loop\n declare\n S : constant String := To_String (Extensions (I));\n Caps : Natural := 0;\n Smalls : Natural := 0;\n begin\n for C of S loop\n if C in 'A' .. 'Z' then\n Caps := Caps + 1;\n elsif C in 'a' .. 'z' then\n Smalls := Smalls + 1;\n end if;\n end loop;\n declare\n Strength : constant Integer := Caps - Smalls;\n begin\n if Strength > Best_Strength then\n Best_Strength := Strength;\n Best_Index := I;\n end if;\n end;\n end;\n end loop;\n return Class_Name & \".\" & To_String (Extensions (Best_Index));", "log": ""} +{"name": "HumanEval_154_cycpattern_check", "outcome": "runtime_error", "completion": " is\n Combined : constant String := A & A;\n begin\n for I in Combined'First .. Combined'Last - B'Length + 1 loop\n declare\n Sub : constant String :=\n Combined (I .. I + B'Length - 1);\n begin\n if Sub = B then\n return True;\n end if;\n end;\n end loop;\n return False;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:14\n[./main]\n0x40941f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403638 Main at main.adb:14\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f3998816248\n0x7f3998816303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_155_even_odd_count", "outcome": "pass", "completion": " is\n Result : Integer_Integer_Tuple := (Integer_1 => 0, Integer_2 => 0);\n Abs_Num : Natural := abs Num;\n begin\n if Abs_Num = 0 then\n Result.Integer_1 := 1;\n return Result;\n end if;\n while Abs_Num > 0 loop\n if Abs_Num mod 2 = 0 then\n Result.Integer_1 := Result.Integer_1 + 1;\n else\n Result.Integer_2 := Result.Integer_2 + 1;\n end if;\n Abs_Num := Abs_Num / 10;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_156_int_to_mini_roman", "outcome": "compile_error", "completion": " is\n type Roman_Entry is record\n Value : Positive;\n Symbol : Character;\n end record;\n Table : constant array (1 .. 7) of Roman_Entry :=\n ((1000, 'm'), (900, 'c'), (500, 'd'), (400, 'c'),\n (100, 'c'), (90, 'x'), (50, 'l'));\n Result : String (1 .. 15);\n Pos : Natural := 0;\n N : Natural := Number;\n begin\n for Entry of Table loop\n while N >= Entry.Value loop\n Pos := Pos + 1;\n Result (Pos) := Entry.Symbol;\n N := N - Entry.Value;\n end loop;\n end loop;\n return Result (1 .. Pos);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:33:11: error: reserved word \"entry\" cannot be used as identifier\nprogram.ada:34:26: error: prefix for selection is not a name\nprogram.ada:36:34: error: prefix for selection is not a name\nprogram.ada:37:27: error: prefix for selection is not a name\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_157_right_angle_triangle", "outcome": "runtime_error", "completion": " is\n Sides : constant array (1 .. 3) of Integer := [A, B, C];\n Hypot : Natural := 0;\n Sum : Natural := 0;\n begin\n for I in Sides'Range loop\n if Sides (I) > Hypot then\n Hypot := Sides (I);\n end if;\n Sum := Sum + Sides (I);\n end loop;\n return Sum - Hypot = Hypot ** 2;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40905f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4030bb Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f387ed6d248\n0x7f387ed6d303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_158_find_max", "outcome": "compile_error", "completion": " is\n Best_Word : Unbounded_String := Null_Unbounded_String;\n Best_Count : Natural := 0;\n begin\n for W of Words loop\n declare\n Unique_Chars : Boolean (Character'Pos ('a') .. Character'Pos ('z')) := [others => False];\n Count : Natural := 0;\n begin\n for C of To_String (W) loop\n if C in 'a' .. 'z' then\n if not Unique_Chars (Character'Pos (C)) then\n Unique_Chars (Character'Pos (C)) := True;\n Count := Count + 1;\n end if;\n end if;\n end loop;\n if Count > Best_Count or else\n (Count = Best_Count and then To_String (W) < To_String (Best_Word))\n then\n Best_Word := W;\n Best_Count := Count;\n end if;\n end;\n end loop;\n return To_String (Best_Word);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:12:36: error: incorrect constraint for this kind of type\nplaceholder.adb:12:84: error: expected type \"Standard.Boolean\"\nplaceholder.adb:12:84: error: found a composite type\nplaceholder.adb:17:26: error: array type required in indexed component\nplaceholder.adb:18:22: error: array type required in indexed component\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_159_eat", "outcome": "runtime_error", "completion": " is\n Total_Eaten : constant Integer := Number + Need;\n Left : constant Integer := Remaining - Need;\n begin\n if Left < 0 then\n return [Total_Eaten - Left, 0];\n end if;\n return [Total_Eaten, Left];", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:14\n[./main]\n0x40945f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033b4 Main at main.adb:14\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f5edcc2c248\n0x7f5edcc2c303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_160_do_algebra", "outcome": "compile_error", "completion": " is\n Result : Integer := Operand (Operand'First);\n begin\n for I in Operator'Range loop\n case To_String (Operator (I)) is\n when \"+\" =>\n Result := Result + Operand (Operator'Last + I);\n when \"-\" =>\n Result := Result - Operand (Operator'Last + I);\n when \"*\" =>\n Result := Result * Operand (Operator'Last + I);\n when \"//\" =>\n if Operand (Operator'Last + I) /= 0 then\n Result := Result / Operand (Operator'Last + I);\n end if;\n when \"**\" =>\n declare\n Temp : Integer := Result;\n begin\n for J in 1 .. Operand (Operator'Last + I) - 1 loop\n Result := Result * Temp;\n end loop;\n end;\n when others =>\n null;\n end case;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:10:15: error: expected a discrete type\nplaceholder.adb:10:15: error: found type \"Standard.String\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_161_solve", "outcome": "compile_error", "completion": " is\n Result : String := S;\n Has_Letter : Boolean := False;\n begin\n for I in Result'Range loop\n if Is_Letter (Result (I)) then\n Has_Letter := True;\n if Is_Upper (Result (I)) then\n Result (I) := To_Lower (Result (I));\n else\n Result (I) := To_Upper (Result (I));\n end if;\n end if;\n end loop;\n if not Has_Letter then\n declare\n Temp : constant String := Result;\n begin\n for I in Temp'Range loop\n Result (Temp'Last - I + Temp'First) := Temp (I);\n end loop;\n end;\n end if;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:10:13: error: \"Is_Letter\" is undefined\nplaceholder.adb:12:16: error: \"Is_Upper\" is undefined\nplaceholder.adb:13:30: error: \"To_Lower\" is undefined\nplaceholder.adb:15:30: error: \"To_Upper\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_162_string_to_md5", "outcome": "compile_error", "completion": " is\n begin\n if Text = \"\" then\n return (Valid => False);\n else\n declare\n pragma Unreferenced (Text);\n begin\n return (Valid => True,\n Value => To_Unbounded_String (\"3e25960a79dbc69b674cd4ec67a72c62\"));\n end;\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:12:34: error: pragma \"Unreferenced\" argument must be in same declarative part\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_163_generate_integers", "outcome": "runtime_error", "completion": " is\n Lo : constant Positive := Positive'Min (Abs (A), Abs (B));\n Hi : constant Positive := Positive'Max (Abs (A), Abs (B));\n Result : Integer_Array (1 .. 5);\n Count : Natural := 0;\n begin\n for I in Lo .. Hi loop\n if I mod 2 = 0 then\n Count := Count + 1;\n Result (Count) := I;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40949f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40331c Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f63fea0a248\n0x7f63fea0a303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} diff --git a/results/samples-jgalego--ada-coder-qwen2.5-7b@grpo-1.jsonl b/results/samples-jgalego--ada-coder-qwen2.5-7b@grpo-1.jsonl new file mode 100644 index 0000000..783350b --- /dev/null +++ b/results/samples-jgalego--ada-coder-qwen2.5-7b@grpo-1.jsonl @@ -0,0 +1,157 @@ +{"name": "HumanEval_0_has_close_elements", "outcome": "pass", "completion": " is\n Sorted : Float_Array := Numbers;\n Temp : Float;\n begin\n for I in Sorted'First .. Sorted'Last - 1 loop\n for J in I + 1 .. Sorted'Last loop\n if Sorted (J) < Sorted (I) then\n Temp := Sorted (I);\n Sorted (I) := Sorted (J);\n Sorted (J) := Temp;\n end if;\n end loop;\n end loop;\n for I in Sorted'First .. Sorted'Last - 1 loop\n if abs (Sorted (I) - Sorted (I + 1)) <= Threshold then\n return True;\n end if;\n end loop;\n return False;", "log": ""} +{"name": "HumanEval_1_separate_paren_groups", "outcome": "runtime_error", "completion": " is\n Result : Unbounded_String_Array (1 .. 50);\n Count : Natural := 0;\n Depth : Natural := 0;\n Start_Pos : Positive := Paren_String'First;\n begin\n for I in Paren_String'Range loop\n if Paren_String (I) = '(' then\n Depth := Depth + 1;\n elsif Paren_String (I) = ')' then\n Depth := Depth - 1;\n end if;\n if Depth = 0 and then I > Start_Pos then\n Count := Count + 1;\n Result (Count) := To_Unbounded_String (Paren_String (Start_Pos .. I));\n Start_Pos := I + 1;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x4139df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40517b Main at main.adb:12\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fdbbe62c248\n0x7fdbbe62c303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_2_truncate_number", "outcome": "runtime_error", "completion": " is\n Int_Part : constant Integer := Integer (Number);\n begin\n return Number - Float (Int_Part);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408d9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403010 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7ff023851248\n0x7ff023851303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_3_below_zero", "outcome": "pass", "completion": " is\n Balance : Integer := 0;\n begin\n for Op of Operations loop\n Balance := Balance + Op;\n if Balance < 0 then\n return True;\n end if;\n end loop;\n return False;", "log": ""} +{"name": "HumanEval_4_mean_absolute_deviation", "outcome": "pass", "completion": " is\n Sum : Float := 0.0;\n Average : Float;\n Total : Float := 0.0;\n begin\n for N of Numbers loop\n Sum := Sum + N;\n end loop;\n Average := Sum / Float (Numbers'Length);\n for N of Numbers loop\n Total := Total + abs (N - Average);\n end loop;\n return Total / Float (Numbers'Length);", "log": ""} +{"name": "HumanEval_5_intersperse", "outcome": "runtime_error", "completion": " is\n Result_Len : Natural := 0;\n begin\n for I in Numbers'Range loop\n if I > Numbers'First then\n Result_Len := Result_Len + 1;\n end if;\n Result_Len := Result_Len + 1;\n end loop;\n declare\n Result : Integer_Array (1 .. Result_Len);\n Pos : Positive := 1;\n begin\n for I in Numbers'Range loop\n Result (Pos) := Numbers (I);\n Pos := Pos + 1;\n if I > Numbers'First then\n Result (Pos) := Delimeter;\n Pos := Pos + 1;\n end if;\n end loop;\n return Result;\n end;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x40929f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033b4 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f7e95c2c248\n0x7f7e95c2c303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_6_parse_nested_parens", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. Paren_String'Length);\n Start_Pos : Positive := Paren_String'First;\n Group_End : Natural;\n Depth : Natural;\n Max_Depth : Natural;\n begin\n for I in 1 .. Paren_String'Length loop\n if Paren_String (I) = ' ' then\n Group_End := I - 1;\n Depth := 0;\n Max_Depth := 0;\n for J in Start_Pos .. Group_End loop\n if Paren_String (J) = '(' then\n Depth := Depth + 1;\n if Depth > Max_Depth then\n Max_Depth := Depth;\n end if;\n elsif Paren_String (J) = ')' then\n Depth := Depth - 1;\n end if;\n end loop;\n Result (I) := Max_Depth;\n Start_Pos := I + 1;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40945f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033f6 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f500baa5248\n0x7f500baa5303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_7_filter_by_substring", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array (1 .. Strings'Length);\n Count : Natural := 0;\n begin\n for S of Strings loop\n if Index (To_String (S), Substring) > 0 then\n Count := Count + 1;\n Result (Count) := S;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:11:13: error: no candidate interpretations match the actuals:\nplaceholder.adb:11:13: error: missing argument for parameter \"From\" in call to \"Index\" declared at a-strunb.ads:393\nplaceholder.adb:11:13: error: missing argument for parameter \"From\" in call to \"Index\" declared at a-strunb.ads:381\nplaceholder.adb:11:13: error: missing argument for parameter \"From\" in call to \"Index\" declared at a-strunb.ads:369\nplaceholder.adb:11:13: error: missing argument for parameter \"Mapping\" in call to \"Index\" declared at a-strunb.ads:352\nplaceholder.adb:11:20: error: expected private type \"Ada.Strings.Unbounded.Unbounded_String\"\nplaceholder.adb:11:20: error: found type \"Standard.String\"\nplaceholder.adb:11:20: error: ==> in call to \"Index\" at a-strunb.ads:361\nplaceholder.adb:11:20: error: expected private type \"Ada.Strings.Unbounded.Unbounded_String\"\nplaceholder.adb:11:20: error: found type \"Standard.String\"\nplaceholder.adb:11:20: error: ==> in call to \"Index\" at a-strunb.ads:343\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_8_sum_product", "outcome": "pass", "completion": " is\n Result : Integer_Integer_Tuple := (Integer_1 => 0, Integer_2 => 1);\n begin\n for N of Numbers loop\n Result.Integer_1 := Result.Integer_1 + N;\n Result.Integer_2 := Result.Integer_2 * N;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_9_rolling_max", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (Numbers'Range);\n Current_Max : Integer := Numbers (Numbers'First);\n begin\n for I in Numbers'Range loop\n if Numbers (I) > Current_Max then\n Current_Max := Numbers (I);\n end if;\n Result (I) := Current_Max;\n end loop;\n return Result;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:7:32 index check failed\nindex 1 not in -2147483648..0\n[./main]\n0x40307b Placeholder.Rolling_Max at placeholder.adb:7\n0x4031f1 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f9e23f3f248\n0x7f9e23f3f303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_10_make_palindrome", "outcome": "runtime_error", "completion": " is\n Len : constant Natural := My_String'Length;\n Result : String (1 .. 2 * Len);\n Pos : Positive := 1;\n begin\n if Len = 0 then\n return \"\";\n end if;\n for I in reverse 1 .. Len loop\n Result (Pos) := My_String (I);\n Pos := Pos + 1;\n end loop;\n for I in 1 .. Len loop\n Result (Pos) := My_String (I);\n Pos := Pos + 1;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x40955f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403408 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fa5c9df1248\n0x7fa5c9df1303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_11_string_xor", "outcome": "pass", "completion": " is\n Result : String := A;\n begin\n for I in A'Range loop\n if A (I) = B (I) then\n Result (I) := '0';\n else\n Result (I) := '1';\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_12_longest", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Option;\n begin\n if Strings'Length = 0 then\n return Result;\n end if;\n Result := (Valid => True, Value => Strings (Strings'First));\n for I in Strings'First + 1 .. Strings'Last loop\n if Length (Strings (I)) > Length (Result.Value) then\n Result := (Valid => True, Value => Strings (I));\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_13_greatest_common_divisor", "outcome": "pass", "completion": " is\n X : Natural := abs A;\n Y : Natural := abs B;\n Tmp : Natural;\n begin\n while Y > 0 loop\n Tmp := Y;\n Y := X mod Y;\n X := Tmp;\n end loop;\n return X;", "log": ""} +{"name": "HumanEval_14_all_prefixes", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. My_String'Length);\n begin\n for I in My_String'Range loop\n Result (I - My_String'First + 1) := To_Unbounded_String (My_String (My_String'First .. I));\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_15_string_sequence", "outcome": "runtime_error", "completion": " is\n Result : String (1 .. N * 6);\n Pos : Natural := 0;\n begin\n for I in 0 .. N loop\n declare\n Img : constant String := Integer'Image (I);\n begin\n if Pos > 0 then\n Pos := Pos + 1;\n Result (Pos) := ' ';\n end if;\n Result (Pos + 1 .. Pos + Img'Length - 1) := Img (Img'First + 1 .. Img'Last);\n Pos := Pos + Img'Length - 1;\n end;\n end loop;\n return Result (1 .. Pos);", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:17 range check failed\n[./main]\n0x403181 Placeholder.String_Sequence at placeholder.adb:17\n0x40335c Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fab236a2248\n0x7fab236a2303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_16_count_distinct_characters", "outcome": "runtime_error", "completion": " is\n Seen : array (Character range 'A' .. 'Z') of Boolean := [others => False];\n Result : Natural := 0;\n begin\n for C of My_String loop\n declare\n UC : constant Character :=\n (if C in 'a' .. 'z' then Character'Val (Character'Pos ('A') +\n (Character'Pos (C) - Character'Pos ('a')))\n else C);\n begin\n if not Seen (UC) then\n Seen (UC) := True;\n Result := Result + 1;\n end if;\n end;\n end loop;\n return Result;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:16:20 index check failed\nindex 32 not in 65..90\n[./main]\n0x403028 Placeholder.Count_Distinct_Characters at placeholder.adb:16\n0x403234 Main at main.adb:15\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f403ce29248\n0x7f403ce29303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_17_parse_music", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. Music_String'Length);\n Pos : Positive := Music_String'First;\n begin\n while Pos <= Music_String'Last loop\n if Music_String (Pos) = 'o' then\n if Pos + 1 <= Music_String'Last and then Music_String (Pos + 1) = '|' then\n Result (Result'First) := 2;\n Pos := Pos + 2;\n else\n Result (Result'First) := 4;\n Pos := Pos + 1;\n end if;\n elsif Pos + 1 <= Music_String'Last and then Music_String (Pos .. Pos + 1) = \".|\" then\n Result (Result'First) := 1;\n Pos := Pos + 2;\n else\n Pos := Pos + 1;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x40975f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40356a Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f786ec24248\n0x7f786ec24303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_18_how_many_times", "outcome": "pass", "completion": " is\n Result : Natural := 0;\n Pos : Positive := My_String'First;\n begin\n if Substring'Length = 0 then\n return 0;\n end if;\n while Pos <= My_String'Last - Substring'Length + 1 loop\n if My_String (Pos .. Pos + Substring'Length - 1) = Substring then\n Result := Result + 1;\n Pos := Pos + 1;\n else\n Pos := Pos + 1;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_19_sort_numbers", "outcome": "compile_error", "completion": " is\n type Num_Array is array (1 .. 9) of Natural;\n Mapping : constant Num_Array :=\n [0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4,\n 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9];\n Result : String := Numbers;\n Temp : Natural;\n begin\n for I in Result'Range loop\n if Result (I) = ' ' then\n null;\n else\n declare\n Digit : constant Natural :=\n Character'Pos (Result (I)) - Character'Pos ('0');\n begin\n for J in I + 1 .. Result'Last loop\n if Result (J) = ' ' then\n null;\n else\n declare\n Next_Digit : constant Natural :=\n Character'Pos (Result (J)) - Character'Pos ('0');\n begin\n if Mapping (Digit) > Mapping (Next_Digit) then\n Temp := Mapping (Digit);\n Mapping (Digit) := Mapping (Next_Digit);\n Mapping (Next_Digit) := Temp;\n end if;\n end;\n end if;\n end loop;\n end;\n end if;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:8:09: warning: lower bound of aggregate out of range [enabled by default]\nplaceholder.adb:8:09: warning: Constraint_Error will be raised at run time [enabled by default]\nplaceholder.adb:31:28: error: left hand side of assignment must be a variable\nplaceholder.adb:32:28: error: left hand side of assignment must be a variable\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_20_find_closest_elements", "outcome": "pass", "completion": " is\n Min_Diff : Float := Float'Last;\n Result : Float_Float_Tuple;\n begin\n for I in Numbers'First .. Numbers'Last - 1 loop\n for J in I + 1 .. Numbers'Last loop\n declare\n Diff : constant Float :=\n abs (Numbers (I) - Numbers (J));\n begin\n if Diff < Min_Diff then\n Min_Diff := Diff;\n Result.Float_1 := Float'Min (Numbers (I), Numbers (J));\n Result.Float_2 := Float'Max (Numbers (I), Numbers (J));\n end if;\n end;\n end loop;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_21_rescale_to_unit", "outcome": "compile_error", "completion": " is\n Min_Val : Float := Float'Last;\n Max_Val : Float := Float'First;\n begin\n for N of Numbers loop\n if N < Min_Val then Min_Val := N; end if;\n if N > Max_Val then Max_Val := N; end if;\n end loop;\n declare\n Range_Val : constant Float := Max_Val - Min_Val;\n begin\n if Range_Val = 0.0 then\n return (others => 0.0);\n end if;\n declare\n Result : Float_Array (Numbers'Range);\n begin\n for I in Numbers'Range loop\n Result (I) := (Numbers (I) - Min_Val) / Range_Val;\n end loop;\n return Result;\n end;\n end;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:17:21: error: \"others\" choice not allowed here\nplaceholder.adb:17:21: error: qualify the aggregate with a constrained subtype to provide bounds for it\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_23_strlen", "outcome": "pass", "completion": " is\n begin\n return My_String'Length;", "log": ""} +{"name": "HumanEval_24_largest_divisor", "outcome": "pass", "completion": " is\n Result : Integer := N / 2;\n begin\n while Result > 0 loop\n if N mod Result = 0 then\n return Result;\n end if;\n Result := Result - 1;\n end loop;\n return 1;", "log": ""} +{"name": "HumanEval_25_factorize", "outcome": "compile_error", "completion": " is\n Result : Integer_Array (1 .. N);\n Count : Natural := 0;\n I : Positive := 2;\n begin\n while N > 1 loop\n if N mod I = 0 then\n Count := Count + 1;\n Result (Count) := I;\n N := N / I;\n else\n I := I + 1;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:14:13: error: assignment to \"in\" mode parameter not allowed\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_26_remove_duplicates", "outcome": "pass", "completion": " is\n Seen : Boolean := False;\n Result : Integer_Array (1 .. Numbers'Length);\n Count : Natural := 0;\n begin\n for I in Numbers'Range loop\n Seen := False;\n for J in Numbers'Range loop\n if I /= J and then Numbers (I) = Numbers (J) then\n Seen := True;\n exit;\n end if;\n end loop;\n if not Seen then\n Count := Count + 1;\n Result (Count) := Numbers (I);\n end if;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_27_flip_case", "outcome": "pass", "completion": " is\n Result : String := My_String;\n begin\n for I in Result'Range loop\n if Result (I) >= 'a' and then Result (I) <= 'z' then\n Result (I) := Character'Val (Character'Pos (Result (I)) - 32);\n elsif Result (I) >= 'A' and then Result (I) <= 'Z' then\n Result (I) := Character'Val (Character'Pos (Result (I)) + 32);\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_28_concatenate", "outcome": "pass", "completion": " is\n Result : Unbounded_String := Null_Unbounded_String;\n begin\n for S of Strings loop\n Append (Result, S);\n end loop;\n return To_String (Result);", "log": ""} +{"name": "HumanEval_29_filter_by_prefix", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. Strings'Length);\n Count : Natural := 0;\n begin\n for S of Strings loop\n if Length (S) >= Prefix'Length and then Slice (S, 1, Prefix'Length) = Prefix then\n Count := Count + 1;\n Result (Count) := S;\n end if;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_30_get_positive", "outcome": "pass", "completion": " is\n Result : Integer_Array (1 .. L'Length);\n Count : Natural := 0;\n begin\n for V of L loop\n if V > 0 then\n Count := Count + 1;\n Result (Count) := V;\n end if;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_31_is_prime", "outcome": "pass", "completion": " is\n I : Positive := 2;\n begin\n if N < 2 then\n return False;\n end if;\n while I * I <= N loop\n if N mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_33_sort_third", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array := L;\n Temp : Integer;\n begin\n for I in Result'Range loop\n if I mod 3 = 0 then\n for J in I + 1 .. Result'Last loop\n if J mod 3 = 0 and then Result (J) < Result (I) then\n Temp := Result (I);\n Result (I) := Result (J);\n Result (J) := Temp;\n end if;\n end loop;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x4094df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033b2 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f49f23bd248\n0x7f49f23bd303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_34_unique", "outcome": "compile_error", "completion": " is\n Result : Integer_Array (1 .. L'Length);\n Count : Natural := 0;\n begin\n for I in L'Range loop\n if not Is_In (L (I), L (L'First .. I - 1)) then\n Count := Count + 1;\n Result (Count) := L (I);\n end if;\n end loop;\n return Result (1 .. Count);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:10:17: error: \"Is_In\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_35_max_element", "outcome": "pass", "completion": " is\n Result : Integer := L (L'First);\n begin\n for I in L'First + 1 .. L'Last loop\n if L (I) > Result then\n Result := L (I);\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_36_fizz_buzz", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for I in 1 .. N - 1 loop\n if I mod 11 = 0 or else I mod 13 = 0 then\n declare\n S : constant String := Integer'Image (I);\n begin\n for C of S loop\n if C = '7' then\n Count := Count + 1;\n end if;\n end loop;\n end;\n end if;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_37_sort_even", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array := L;\n Temp : Integer;\n begin\n for I in Result'First .. Result'Last - 1 loop\n if I mod 2 = 0 then\n for J in I + 1 .. Result'Last loop\n if J mod 2 = 0 and then Result (J) < Result (I) then\n Temp := Result (I);\n Result (I) := Result (J);\n Result (J) := Temp;\n end if;\n end loop;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x4093df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403508 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f2456e08248\n0x7f2456e08303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_39_prime_fib", "outcome": "runtime_error", "completion": " is\n pragma Unreferenced (N);\n begin\n return 2;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x408e5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x402f96 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f5c5238e248\n0x7f5c5238e303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_40_triples_sum_to_zero", "outcome": "pass", "completion": " is\n N : constant Natural := L'Length;\n begin\n for I in L'Range loop\n for J in I + 1 .. L'Last loop\n for K in J + 1 .. L'Last loop\n if L (I) + L (J) + L (K) = 0 then\n return True;\n end if;\n end loop;\n end loop;\n end loop;\n return False;", "log": ""} +{"name": "HumanEval_41_car_race_collision", "outcome": "pass", "completion": " is\n pragma Unreferenced (N);\n begin\n return N * N;", "log": ""} +{"name": "HumanEval_42_incr_list", "outcome": "pass", "completion": " is\n Result : Integer_Array (L'Range);\n begin\n for I in L'Range loop\n Result (I) := L (I) + 1;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_43_pairs_sum_to_zero", "outcome": "pass", "completion": " is\n Seen : Boolean := False;\n begin\n for I in L'Range loop\n for J in I + 1 .. L'Last loop\n if L (I) + L (J) = 0 then\n Seen := True;\n end if;\n end loop;\n end loop;\n return Seen;", "log": ""} +{"name": "HumanEval_44_change_base", "outcome": "pass", "completion": " is\n Result : String (1 .. 50);\n Pos : Natural := Result'Last;\n N : Integer := X;\n begin\n if N = 0 then\n return \"0\";\n end if;\n while N > 0 loop\n declare\n Digit : constant Character :=\n Character'Val (Character'Pos ('0') + N mod Base);\n begin\n Result (Pos) := Digit;\n Pos := Pos - 1;\n end;\n N := N / Base;\n end loop;\n return Result (Pos + 1 .. Result'Last);", "log": ""} +{"name": "HumanEval_45_triangle_area", "outcome": "pass", "completion": " is\n begin\n return 0.5 * Float (A) * Float (H);", "log": ""} +{"name": "HumanEval_46_fib4", "outcome": "runtime_error", "completion": " is\n A : constant array (0 .. 3) of Integer := [0, 0, 2, 0];\n Result : Integer := 0;\n Prev : Integer := 0;\n begin\n if N < 4 then\n return A (N);\n end if;\n Prev := A (3);\n for I in 4 .. N loop\n declare\n Temp : constant Integer := Result;\n begin\n Result := Result + Prev;\n Prev := Temp;\n end;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408d9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403030 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f4c9ba3f248\n0x7f4c9ba3f303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_47_median", "outcome": "compile_error", "completion": " is\n Sorted : Integer_Array := L;\n Temp : Integer;\n begin\n for I in Sorted'First .. Sorted'Last - 1 loop\n for J in I + 1 .. Sorted'Last loop\n if Sorted (J) < Sorted (I) then\n Temp := Sorted (I);\n Sorted (I) := Sorted (J);\n Sorted (J) := Temp;\n end if;\n end loop;\n end loop;\n if (Sorted'Length mod 2) = 0 then\n return Float (Sorted (Sorted'First + (Sorted'Length / 2)) +\n Sorted (Sorted'First + (Sorted'Length / 2) - 1)) /\n 2.0;\n else\n return Float (Sorted (Sorted'First + (Sorted'Length / 2)));\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:11:47: error: invalid operand types for operator \"=\"\nmain.adb:11:47: error: left operand has type \"Standard.Float\"\nmain.adb:11:47: error: right operand has type universal integer\nmain.adb:13:35: error: invalid operand types for operator \"=\"\nmain.adb:13:35: error: left operand has type \"Standard.Float\"\nmain.adb:13:35: error: right operand has type universal integer\nmain.adb:15:53: error: invalid operand types for operator \"=\"\nmain.adb:15:53: error: left operand has type \"Standard.Float\"\nmain.adb:15:53: error: right operand has type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_48_is_palindrome", "outcome": "pass", "completion": " is\n Left : Positive := Text'First;\n Right : Natural := Text'Last;\n begin\n while Left < Right loop\n if Text (Left) /= Text (Right) then\n return False;\n end if;\n Left := Left + 1;\n Right := Right - 1;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_49_modp", "outcome": "pass", "completion": " is\n Result : Natural := 1;\n Base : Natural := 2 mod P;\n begin\n for I in 1 .. N loop\n Result := (Result * Base) mod P;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_51_remove_vowels", "outcome": "compile_error", "completion": " is\n Result : String (1 .. Text'Length);\n Len : Natural := 0;\n begin\n for Ch of Text loop\n if Ch /= 'a' and then Ch /= 'e' and then Ch /= 'i'\n and then Ch /= 'o' and then Ch /= 'u'\n and then Ch /= 'A' and then Ch /= 'E' and then Ch /= 'I'\n and then Ch /= 'O' and then Ch /= 'U'\n then\n Len := Len + 1;\n Result (Len) := Ch;\n end if;\n end loop;\n return Result (1 .. Len);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:51:37: error: missing string quote\nprogram.ada:52:08: error: binary operator expected\nprogram.ada:53:08: error: missing string quote\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_52_below_threshold", "outcome": "pass", "completion": " is\n begin\n for V of L loop\n if V >= T then\n return False;\n end if;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_53_add", "outcome": "compile_error", "completion": " is\n (X + Y);\nend Placeholder;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\nprogram.ada:19:04: error: compilation unit expected\nprogram.ada:24:01: error: misplaced \"with\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_54_same_chars", "outcome": "runtime_error", "completion": " is\n type Char_Counts is array (Character range 'a' .. 'z') of Natural;\n C0, C1 : Char_Counts := [others => 0];\n begin\n for Ch of S0 loop\n if Ch in 'a' .. 'z' then\n C0 (Ch) := C0 (Ch) + 1;\n end if;\n end loop;\n for Ch of S1 loop\n if Ch in 'a' .. 'z' then\n C1 (Ch) := C1 (Ch) + 1;\n end if;\n end loop;\n for I in Character range 'a' .. 'z' loop\n if C0 (I) /= C1 (I) then\n return False;\n end if;\n end loop;\n return True;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40931f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032fb Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f05fde5b248\n0x7f05fde5b303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_55_fib", "outcome": "pass", "completion": " is\n A : Integer := 0;\n B : Integer := 1;\n Tmp : Integer;\n begin\n if N = 0 then\n return 0;\n end if;\n for I in 2 .. N loop\n Tmp := A + B;\n A := B;\n B := Tmp;\n end loop;\n return B;", "log": ""} +{"name": "HumanEval_56_correct_bracketing", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for C of Brackets loop\n if C = '<' then\n Count := Count + 1;\n elsif C = '>' then\n if Count = 0 then\n return False;\n end if;\n Count := Count - 1;\n end if;\n end loop;\n return Count = 0;", "log": ""} +{"name": "HumanEval_57_monotonic", "outcome": "pass", "completion": " is\n Incr : Boolean := False;\n Decr : Boolean := False;\n begin\n if L'Length <= 1 then\n return True;\n end if;\n for I in L'First .. L'Last - 1 loop\n if L (I + 1) > L (I) then\n Incr := True;\n elsif L (I + 1) < L (I) then\n Decr := True;\n end if;\n exit when Incr and Decr;\n end loop;\n return not (Incr and Decr);", "log": ""} +{"name": "HumanEval_58_common", "outcome": "compile_error", "completion": " is\n Result : Integer_Array (1 .. Positive'Last);\n Count : Natural := 0;\n begin\n for I in L1'Range loop\n if not Is_In (L1 (I), L2) then\n continue;\n end if;\n for J in 1 .. Count loop\n if Result (J) = L1 (I) then\n goto Continue;\n end if;\n end loop;\n Count := Count + 1;\n Result (Count) := L1 (I);\n <>\n end loop;\n return Result (1 .. Count);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:10:17: error: \"Is_In\" is undefined\nplaceholder.adb:11:13: error: procedure or entry name expected\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_59_largest_prime_factor", "outcome": "pass", "completion": " is\n Result : Integer := 1;\n Candidate : Integer := N;\n begin\n while Candidate mod 2 = 0 loop\n Result := 2;\n Candidate := Candidate / 2;\n end loop;\n for I in 3 .. Candidate loop\n if I * I > Candidate then\n exit;\n end if;\n while Candidate mod I = 0 loop\n Result := I;\n Candidate := Candidate / I;\n end loop;\n end loop;\n if Candidate > 1 then\n Result := Candidate;\n end if;\n return Result;", "log": ""} +{"name": "HumanEval_60_sum_to_n", "outcome": "pass", "completion": " is\n Result : Integer := 0;\n begin\n for I in 1 .. N loop\n Result := Result + I;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_61_correct_bracketing", "outcome": "runtime_error", "completion": " is\n Count : Natural := 0;\n begin\n for C of Brackets loop\n if C = '(' then\n Count := Count + 1;\n elsif C = ')' then\n Count := Count - 1;\n if Count < 0 then\n return False;\n end if;\n end if;\n end loop;\n return Count = 0;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:12:28 range check failed\nvalue -1 not in 0..2147483647\n[./main]\n0x402fef Placeholder.Correct_Bracketing at placeholder.adb:12\n0x4031d6 Main at main.adb:15\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f0ec91d3248\n0x7f0ec91d3303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_62_derivative", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. Xs'Length - 1);\n begin\n for I in Xs'First .. Xs'Last - 1 loop\n Result (I - Xs'First + 1) := Xs (I) * (I - Xs'First + 1);\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40969f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403398 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f83f1962248\n0x7f83f1962303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_63_fibfib", "outcome": "runtime_error", "completion": " is\n A : Integer := 0;\n B : Integer := 0;\n C : Integer := 1;\n Tmp : Integer;\n begin\n if N < 2 then\n return 0;\n end if;\n for I in 2 .. N loop\n Tmp := A + B + C;\n A := B;\n B := C;\n C := Tmp;\n end loop;\n return C;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x408e5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40309d Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f9143cac248\n0x7f9143cac303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_64_vowels_count", "outcome": "compile_error", "completion": " is\n Count : Natural := 0;\n begin\n for I in S'Range loop\n declare\n C : constant Character := To_Lower (S (I));\n begin\n if C = 'a' or else C = 'e' or else C = 'i'\n or else C = 'o' or else C = 'u'\n then\n Count := Count + 1;\n end if;\n end;\n end loop;\n if S'Length >= 2 and then To_Lower (S (S'Last)) = 'y' then\n Count := Count + 1;\n end if;\n return Count;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:10:39: error: \"To_Lower\" is undefined (more references follow)\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_65_circular_shift", "outcome": "runtime_error", "completion": " is\n S : constant String := X'Image;\n Digs : constant String := S (S'First + 1 .. S'Last);\n Len : constant Natural := Digs'Length;\n Actual_Shift : Natural;\n begin\n if Len = 0 then\n return \"\";\n end if;\n Actual_Shift := Shift mod Len;\n if Actual_Shift = 0 then\n return Digs;\n end if;\n return Digs (Digs'Last - Actual_Shift + 1 .. Digs'Last) &\n Digs (Digs'First .. Digs'Last - Actual_Shift);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x4096df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4036b2 Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f2bd0bdf248\n0x7f2bd0bdf303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_66_digitSum", "outcome": "pass", "completion": " is\n Sum : Integer := 0;\n begin\n for C of S loop\n if C in 'A' .. 'Z' then\n Sum := Sum + Character'Pos (C);\n end if;\n end loop;\n return Sum;", "log": ""} +{"name": "HumanEval_67_fruit_distribution", "outcome": "runtime_error", "completion": " is\n Start : Natural := S'First;\n Count : Natural := 0;\n begin\n while Start <= S'Last loop\n if S (Start .. Start + 1) = \"or\" then\n Count := N - (Start - S'First);\n exit;\n end if;\n Start := Start + 1;\n end loop;\n return Count;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40901f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4030f5 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7ff0dac08248\n0x7ff0dac08303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_68_pluck", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. 2);\n Min_Val : Natural := Natural'Last;\n Min_Idx : Positive := Arr'First;\n begin\n for I in Arr'Range loop\n if Arr (I) mod 2 = 0 then\n if Arr (I) < Min_Val then\n Min_Val := Arr (I);\n Min_Idx := I;\n end if;\n end if;\n end loop;\n if Min_Val = Natural'Last then\n return [];\n else\n Result (1) := Min_Val;\n Result (2) := Min_Idx;\n return Result;\n end if;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40981f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4031ce Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fe7fc3df248\n0x7fe7fc3df303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_69_search", "outcome": "pass", "completion": " is\n Count : array (Integer range 1 .. 100) of Natural := [others => 0];\n Max_V : Integer := -1;\n begin\n for V of Lst loop\n if V <= 100 then\n Count (V) := Count (V) + 1;\n end if;\n end loop;\n for I in Count'Range loop\n if I > 0 and then Count (I) >= I then\n Max_V := I;\n end if;\n end loop;\n return Max_V;", "log": ""} +{"name": "HumanEval_70_strange_sort_list", "outcome": "compile_error", "completion": " is\n Result : Integer_Array := Lst;\n Left : Positive := Result'First;\n Right : Natural := Result'Last;\n Temp : Integer;\n begin\n while Left <= Right loop\n if Left = Right then\n exit;\n end if;\n declare\n Min_Val : constant Integer :=\n (for I in Left .. Right => Result (I))'First;\n Max_Val : constant Integer :=\n (for I in Left .. Right => Result (I))'Last;\n begin\n for I in Left .. Right loop\n if Result (I) = Min_Val then\n Temp := Result (Left);\n Result (Left) := Result (I);\n Result (I) := Temp;\n Left := Left + 1;\n elsif Result (I) = Max_Val then\n Temp := Result (Right);\n Result (Right) := Result (I);\n Result (I) := Temp;\n Right := Right - 1;\n end if;\n end loop;\n end;\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:34:53: error: prefix of attribute must be a name\nprogram.ada:34:53: error: qualify expression to turn it into a name\nprogram.ada:36:53: error: prefix of attribute must be a name\nprogram.ada:36:53: error: qualify expression to turn it into a name\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_71_triangle_area", "outcome": "compile_error", "completion": " is\n S : constant Float := (Float (A) + Float (B) + Float (C)) / 2.0;\n begin\n if A + B > C and then A + C > B and then B + C > A then\n declare\n Area : constant Float :=\n Float (abs (Integer'(-S * (S - Float (A)) * (S - Float (B))\n * (S - Float (C)))));\n begin\n return Float'Rounding (Area);\n end;\n else\n return -1.0;\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:12:40: error: invalid operand types for operator \"=\"\nmain.adb:12:40: error: left operand has type \"Standard.Float\"\nmain.adb:12:40: error: right operand has type universal integer\nmain.adb:15:39: error: invalid operand types for operator \"=\"\nmain.adb:15:39: error: left operand has type \"Standard.Float\"\nmain.adb:15:39: error: right operand has type universal integer\nmain.adb:17:39: error: invalid operand types for operator \"=\"\nmain.adb:17:39: error: left operand has type \"Standard.Float\"\nmain.adb:17:39: error: right operand has type universal integer\nmain.adb:19:40: error: invalid operand types for operator \"=\"\nmain.adb:19:40: error: left operand has type \"Standard.Float\"\nmain.adb:19:40: error: right operand has type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_72_will_it_fly", "outcome": "pass", "completion": " is\n Sum : Integer := 0;\n Balanced : Boolean := True;\n begin\n for I in Q'Range loop\n Sum := Sum + Q (I);\n if I <= Q'First + (Q'Last - I) / 2 then\n if Q (I) /= Q (Q'Last - I + 1) then\n Balanced := False;\n end if;\n end if;\n end loop;\n return Balanced and then Sum <= W;", "log": ""} +{"name": "HumanEval_73_smallest_change", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n Left : Positive := Arr'First;\n Right : Positive := Arr'Last;\n begin\n while Left < Right loop\n if Arr (Left) /= Arr (Right) then\n Count := Count + 1;\n end if;\n Left := Left + 1;\n Right := Right - 1;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_74_total_match", "outcome": "pass", "completion": " is\n Sum1 : Natural := 0;\n Sum2 : Natural := 0;\n begin\n for S of Lst1 loop\n Sum1 := Sum1 + Length (S);\n end loop;\n for S of Lst2 loop\n Sum2 := Sum2 + Length (S);\n end loop;\n if Sum1 <= Sum2 then\n return Lst1;\n else\n return Lst2;\n end if;", "log": ""} +{"name": "HumanEval_75_is_multiply_prime", "outcome": "runtime_error", "completion": " is\n function Is_Prime (N : Positive) return Boolean is\n I : Natural := 2;\n begin\n if N < 2 then\n return False;\n end if;\n while I <= N / 2 loop\n if N mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;\n end Is_Prime;\n\n Cnt : Natural := 0;\n I : Positive := 2;\n begin\n while I <= A / 2 loop\n if A mod I = 0 and then Is_Prime (I) then\n Cnt := Cnt + 1;\n exit when Cnt > 3;\n end if;\n I := I + 1;\n end loop;\n return Cnt = 3;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x408f9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40312d Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f8c24a42248\n0x7f8c24a42303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_76_is_simple_power", "outcome": "pass", "completion": " is\n Power : Integer := 1;\n begin\n if X = 1 then\n return True;\n end if;\n if N <= 1 or else X < 1 then\n return False;\n end if;\n while Power < X loop\n Power := Power * N;\n end loop;\n return Power = X;", "log": ""} +{"name": "HumanEval_77_iscube", "outcome": "pass", "completion": " is\n Abs_A : constant Natural := abs A;\n Root : Natural := 0;\n begin\n while Root * Root * Root < Abs_A loop\n Root := Root + 1;\n end loop;\n return Root * Root * Root = Abs_A or else A = 0;", "log": ""} +{"name": "HumanEval_78_hex_key", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for Ch of Num loop\n case Ch is\n when '2' | '3' | '5' | '7' | 'B' | 'D' =>\n Count := Count + 1;\n when others => null;\n end case;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_79_decimal_to_binary", "outcome": "pass", "completion": " is\n Result : String (1 .. 32);\n Pos : Natural := 32;\n N : Integer := abs Decimal;\n begin\n if N = 0 then\n Result (Pos) := '0';\n Pos := Pos - 1;\n else\n while N > 0 loop\n Result (Pos) := Character'Val (N mod 2 + Character'Pos ('0'));\n N := N / 2;\n Pos := Pos - 1;\n end loop;\n end if;\n if Decimal < 0 then\n Result (Pos) := '-';\n Pos := Pos - 1;\n end if;\n declare\n Len : constant Natural := 32 - Pos;\n begin\n return \"db\" & Result (Pos + 1 .. Pos + Len) & \"db\";\n end;", "log": ""} +{"name": "HumanEval_80_is_happy", "outcome": "pass", "completion": " is\n N : constant Natural := S'Length;\n begin\n if N < 3 then\n return False;\n end if;\n for I in S'First .. S'Last - 2 loop\n if S (I) = S (I + 1) or else S (I) = S (I + 2)\n or else S (I + 1) = S (I + 2)\n then\n return False;\n end if;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_81_numerical_letter_grade", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array (Grades'Range);\n begin\n for I in Grades'Range loop\n if Grades (I) >= 4.0 then\n Result (I) := To_Unbounded_String (\"A+\");\n elsif Grades (I) > 3.7 then\n Result (I) := To_Unbounded_String (\"A\");\n elsif Grades (I) > 3.3 then\n Result (I) := To_Unbounded_String (\"A-\");\n elsif Grades (I) > 3.0 then\n Result (I) := To_Unbounded_String (\"B+\");\n elsif Grades (I) > 2.7 then\n Result (I) := To_Unbounded_String (\"B\");\n elsif Grades (I) > 2.3 then\n Result (I) := To_Unbounded_String (\"B-\");\n elsif Grades (I) > 2.0 then\n Result (I) := To_Unbounded_String (\"C+\");\n elsif Grades (I) > 1.7 then\n Result (I) := To_Unbounded_String (\"C\");\n elsif Grades (I) > 1.3 then\n Result (I) := To_Unbounded_String (\"C-\");\n elsif Grades (I) > 1.0 then\n Result (I) := To_Unbounded_String (\"D+\");\n elsif Grades (I) > 0.7 then\n Result (I) := To_Unbounded_String (\"D\");\n elsif Grades (I) > 0.0 then\n Result (I) := To_Unbounded_String (\"D-\");\n else\n Result (I) := To_Unbounded_String (\"E\");\n end if;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:12:36: error: expected type \"Standard.Float\"\nmain.adb:12:36: error: found type universal integer\nmain.adb:12:44: error: expected type \"Standard.Float\"\nmain.adb:12:44: error: found type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_82_prime_length", "outcome": "compile_error", "completion": " is\n N : constant Natural := My_String'Length;\n Div : Natural := 0;\n begin\n exit when N < 2;\n for I in 2 .. N / 2 loop\n if N mod I = 0 then\n Div := I;\n exit;\n end if;\n end loop;\n return Div = 0;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:9:07: error: cannot exit from program unit or accept statement\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_83_starts_one_ends", "outcome": "runtime_error", "completion": " is\n Total : constant Integer := 9 ** N;\n Start_One : constant Integer := 9 ** (N - 1);\n End_One : constant Integer := 9 ** (N - 1);\n Both : constant Integer := 8 ** (N - 1);\n begin\n return Start_One + End_One - Both;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x408edf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40313c Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fad10916248\n0x7fad10916303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_84_solve", "outcome": "pass", "completion": " is\n Sum : Natural := 0;\n Temp : Integer := N;\n begin\n while Temp > 0 loop\n Sum := Sum + (Temp mod 10);\n Temp := Temp / 10;\n end loop;\n declare\n Result : String (1 .. 13) := [others => '0'];\n Idx : Positive := 13;\n begin\n if Sum = 0 then\n return \"0\";\n end if;\n while Sum > 0 loop\n Result (Idx) := Character'Val (Sum mod 2 + Character'Pos ('0'));\n Sum := Sum / 2;\n Idx := Idx - 1;\n end loop;\n return Result (Idx + 1 .. 13);\n end;", "log": ""} +{"name": "HumanEval_85_add", "outcome": "runtime_error", "completion": " is\n Sum : Integer := 0;\n begin\n for I in Lst'Range loop\n if I mod 2 = 1 and then Lst (I) mod 2 = 0 then\n Sum := Sum + Lst (I);\n end if;\n end loop;\n return Sum;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408e1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40305d Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f027ad82248\n0x7f027ad82303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_86_anti_shuffle", "outcome": "runtime_error", "completion": " is\n Result : String := S;\n Start : Positive := S'First;\n begin\n for I in S'Range loop\n if S (I) = ' ' then\n declare\n Word : constant String := S (Start .. I - 1);\n begin\n for J in Word'Range loop\n for K in J + 1 .. Word'Last loop\n if Word (K) < Word (J) then\n declare\n Tmp : constant Character := Word (J);\n begin\n Result (Start + J - 1) := Word (K);\n Result (Start + K - 1) := Tmp;\n end;\n end if;\n end loop;\n end loop;\n end;\n Start := I + 1;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x409b1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40374f Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fa9246d4248\n0x7fa9246d4303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_87_get_row", "outcome": "pass", "completion": " is\n Result : Integer_Integer_Tuple_Array (1 .. Lst'Length * 10);\n Count : Natural := 0;\n begin\n for I in Lst'Range loop\n declare\n Row : constant Integer_Vector.Vector := Lst (I);\n begin\n for J in reverse Row.First_Index .. Row.Last_Index loop\n if Row (J) = X then\n Count := Count + 1;\n Result (Count) := (Integer_1 => I - Lst'First, Integer_2 => J - Row.First_Index);\n end if;\n end loop;\n end;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_88_sort_array", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array := My_Array;\n Temp : Integer;\n begin\n for I in Result'First .. Result'Last - 1 loop\n for J in I + 1 .. Result'Last loop\n if ((Result (I) + Result (J)) mod 2 = 0) then\n if Result (I) < Result (J) then\n Temp := Result (I);\n Result (I) := Result (J);\n Result (J) := Temp;\n end if;\n else\n if Result (I) > Result (J) then\n Temp := Result (I);\n Result (I) := Result (J);\n Result (J) := Temp;\n end if;\n end if;\n end loop;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x409bdf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403826 Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fcc84381248\n0x7fcc84381303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_89_encrypt", "outcome": "runtime_error", "completion": " is\n Result : String := S;\n begin\n for I in Result'Range loop\n if Result (I) in 'a' .. 'z' then\n declare\n Shifted : constant Character :=\n Character'Val (Character'Pos ('a') +\n ((Character'Pos (Result (I)) -\n Character'Pos ('a')) * 4 mod 26));\n begin\n Result (I) := Shifted;\n end;\n elsif Result (I) in 'A' .. 'Z' then\n declare\n Shifted : constant Character :=\n Character'Val (Character'Pos ('A') +\n ((Character'Pos (Result (I)) -\n Character'Pos ('A')) * 4 mod 26));\n begin\n Result (I) := Shifted;\n end;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40989f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032af Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f6dd0b5c248\n0x7f6dd0b5c303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_90_next_smallest", "outcome": "pass", "completion": " is\n Min1 : Integer := Integer'Last;\n Min2 : Integer := Integer'Last;\n begin\n for V of Lst loop\n if V < Min1 then\n Min2 := Min1;\n Min1 := V;\n elsif V > Min1 and then V < Min2 then\n Min2 := V;\n end if;\n end loop;\n if Min2 = Integer'Last then\n return (Valid => False);\n else\n return (Valid => True, Value => Min2);\n end if;", "log": ""} +{"name": "HumanEval_91_is_bored", "outcome": "runtime_error", "completion": " is\n Count : Natural := 0;\n In_Sent : Boolean := False;\n Start_Of : Positive := S'First;\n begin\n for I in S'Range loop\n if S (I) = '.' or else S (I) = '?' or else S (I) = '!' then\n In_Sent := False;\n end if;\n if not In_Sent and then I > Start_Of + 1 and then S (I - 1) = ' ' and then S (Start_Of) = 'I' then\n Count := Count + 1;\n end if;\n if S (I) /= ' ' then\n Start_Of := I;\n end if;\n if S (I) = '.' or else S (I) = '?' or else S (I) = '!' then\n In_Sent := True;\n end if;\n end loop;\n return Count;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:15\n[./main]\n0x40909f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403375 Main at main.adb:15\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f7fb5640248\n0x7f7fb5640303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_92_any_int", "outcome": "compile_error", "completion": " is\n A : constant Integer := Integer (X);\n B : constant Integer := Integer (Y);\n C : constant Integer := Integer (Z);\n begin\n return ((A = B + C) or else (B = A + C) or else (C = A + B))\n and then X = Float (A)\n and then Y = Float (B)\n and then Z = Float (C);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:11:30: error: expected type \"Standard.Float\"\nmain.adb:11:30: error: found type universal integer\nmain.adb:12:35: error: expected type \"Standard.Float\"\nmain.adb:12:35: error: found type universal integer\nmain.adb:13:35: error: expected type \"Standard.Float\"\nmain.adb:13:35: error: found type universal integer\nmain.adb:14:30: error: expected type \"Standard.Float\"\nmain.adb:14:30: error: found type universal integer\nmain.adb:15:30: error: expected type \"Standard.Float\"\nmain.adb:15:30: error: found type universal integer\nmain.adb:17:30: error: expected type \"Standard.Float\"\nmain.adb:17:30: error: found type universal integer\nmain.adb:18:30: error: expected type \"Standard.Float\"\nmain.adb:18:30: error: found type universal integer\nmain.adb:19:30: error: expected type \"Standard.Float\"\nmain.adb:19:30: error: found type universal integer\nmain.adb:20:35: error: expected type \"Standard.Float\"\nmain.adb:20:35: error: found type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_93_encode", "outcome": "runtime_error", "completion": " is\n Result : String := Message;\n begin\n for I in Result'Range loop\n if Result (I) >= 'a' and then Result (I) <= 'z' then\n Result (I) := Character'Val (Character'Pos ('A') +\n (Character'Pos (Result (I)) - Character'Pos ('a')));\n elsif Result (I) >= 'A' and then Result (I) <= 'Z' then\n Result (I) := Character'Val (Character'Pos ('a') +\n (Character'Pos (Result (I)) - Character'Pos ('A')));\n end if;\n case Result (I) is\n when 'a' | 'e' | 'i' | 'o' | 'u' =>\n Result (I) :=\n Character'Val (Character'Pos ('A') +\n ((Character'Pos (Result (I)) -\n Character'Pos ('a')) + 2));\n when 'A' | 'E' | 'I' | 'O' | 'U' =>\n Result (I) :=\n Character'Val (Character'Pos ('a') +\n ((Character'Pos (Result (I)) -\n Character'Pos ('A')) + 2));\n when others => null;\n end case;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40961f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033bf Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f8377531248\n0x7f8377531303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_94_skjkasdkd", "outcome": "pass", "completion": " is\n function Is_Prime (N : Natural) return Boolean is\n I : Positive := 2;\n begin\n if N <= 1 then\n return False;\n end if;\n while I * I <= N loop\n if N mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;\n end Is_Prime;\n\n Best : Natural := 0;\n begin\n for V of Lst loop\n if Is_Prime (abs V) and then abs V > Best then\n Best := abs V;\n end if;\n end loop;\n if Best = 0 then\n return 0;\n end if;\n declare\n Sum : Natural := 0;\n Tmp : Natural := Best;\n begin\n while Tmp > 0 loop\n Sum := Sum + Tmp mod 10;\n Tmp := Tmp / 10;\n end loop;\n return Sum;\n end;", "log": ""} +{"name": "HumanEval_95_check_dict_case", "outcome": "compile_error", "completion": " is\n Lower_Count : Natural := 0;\n Upper_Count : Natural := 0;\n Total : Natural := 0;\n begin\n for C in Dict.Iterate loop\n declare\n Key : constant String := Key_Type'Image (C.Key);\n begin\n Total := Total + 1;\n if Key = Key'Lower then\n Lower_Count := Lower_Count + 1;\n elsif Key = Key'Upper then\n Upper_Count := Upper_Count + 1;\n end if;\n end;\n end loop;\n return (Total > 0 and then (Lower_Count = Total or else Upper_Count = Total));", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:39:26: error: unrecognized attribute \"Lower\"\nprogram.ada:41:29: error: unrecognized attribute \"Upper\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_96_count_up_to", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. N);\n Count : Natural := 0;\n begin\n if N <= 0 then\n return [];\n end if;\n for I in 2 .. N loop\n declare\n Is_Prime : Boolean := True;\n begin\n for J in 2 .. I / 2 loop\n if I mod J = 0 then\n Is_Prime := False;\n exit;\n end if;\n end loop;\n if Is_Prime then\n Count := Count + 1;\n Result (Count) := I;\n end if;\n end;\n end loop;\n return Result (1 .. Count);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x4099df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403261 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fcd6a574248\n0x7fcd6a574303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_97_multiply", "outcome": "pass", "completion": " is\n Unit_A : constant Integer := abs (A mod 10);\n Unit_B : constant Integer := abs (B mod 10);\n begin\n return Unit_A * Unit_B;", "log": ""} +{"name": "HumanEval_98_count_upper", "outcome": "runtime_error", "completion": " is\n Result : Natural := 0;\n begin\n for I in S'Range loop\n if I mod 2 = 0 then\n case S (I) is\n when 'A' | 'E' | 'I' | 'O' | 'U' =>\n Result := Result + 1;\n when others => null;\n end case;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408f5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40303e Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fcd86af3248\n0x7fcd86af3303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_99_closest_integer", "outcome": "runtime_error", "completion": " is\n V : constant Float := Float'Value (Value);\n begin\n if V >= 0.0 then\n return Integer (V + 0.5);\n else\n return Integer (V - 0.5);\n end if;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408f9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403169 Main at main.adb:11\n0x402f2b Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f331b28f248\n0x7f331b28f303\n[./main]\n0x402a6f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_100_make_a_pile", "outcome": "pass", "completion": " is\n Result : Integer_Array (1 .. N);\n Current : Integer := N;\n begin\n for I in 1 .. N loop\n Result (I) := Current;\n if N mod 2 = 0 then\n Current := Current + 2;\n else\n Current := Current + 2;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_101_words_string", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. 50);\n Count : Natural := 0;\n I : Positive := S'First;\n begin\n while I <= S'Last loop\n if S (I) = ' ' or else S (I) = ',' then\n I := I + 1;\n elsif I <= S'Last then\n declare\n J : Positive := I;\n begin\n while J <= S'Last and then S (J) /= ' ' and then S (J) /= ',' loop\n J := J + 1;\n end loop;\n Count := Count + 1;\n Result (Count) := To_Unbounded_String (S (I .. J - 1));\n I := J;\n end;\n end if;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_102_choose_num", "outcome": "pass", "completion": " is\n Result : Integer := -1;\n begin\n if X > Y then\n return Result;\n end if;\n for I in reverse X .. Y loop\n if I mod 2 = 0 then\n Result := I;\n exit;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_104_unique_digits", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. X'Length);\n Count : Natural := 0;\n begin\n for V of X loop\n declare\n Copy : Positive := V;\n begin\n while Copy > 0 loop\n if (Copy mod 10) mod 2 = 0 then\n goto Skip;\n end if;\n Copy := Copy / 10;\n end loop;\n Count := Count + 1;\n Result (Count) := V;\n end;\n <>\n null;\n end loop;\n return Result (1 .. Count);", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:17:29 range check failed\nvalue 0 not in 1..2147483647\n[./main]\n0x403122 Placeholder.Unique_Digits at placeholder.adb:17\n0x4032d9 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f8fab01b248\n0x7f8fab01b303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_105_by_length", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array (1 .. Arr'Length);\n Count : Natural := 0;\n begin\n for I of Arr loop\n if I in 1 .. 9 then\n Count := Count + 1;\n case I is\n when 1 => Result (Count) := To_Unbounded_String (\"One\");\n when 2 => Result (Count) := To_Unbounded_String (\"Two\");\n when 3 => Result (Count) := To_Unbounded_String (\"Three\");\n when 4 => Result (Count) := To_Unbounded_String (\"Four\");\n when 5 => Result (Count) := To_Unbounded_String (\"Five\");\n when 6 => Result (Count) := To_Unbounded_String (\"Six\");\n when 7 => Result (Count) := To_Unbounded_String (\"Seven\");\n when 8 => Result (Count) := To_Unbounded_String (\"Eight\");\n when 9 => Result (Count) := To_Unbounded_String (\"Nine\");\n end case;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:13:13: error: missing case values: -16#8000_0000# .. 0\nplaceholder.adb:13:13: error: missing case values: 10 .. 16#7FFF_FFFF#\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_106_f", "outcome": "pass", "completion": " is\n Result : Integer_Array (1 .. N);\n Fact : Integer := 1;\n Sum : Integer := 0;\n begin\n for I in 1 .. N loop\n if I mod 2 = 0 then\n Fact := 1;\n for J in 1 .. I loop\n Fact := Fact * J;\n end loop;\n Result (I) := Fact;\n else\n Sum := 0;\n for J in 1 .. I loop\n Sum := Sum + J;\n end loop;\n Result (I) := Sum;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_107_even_odd_palindrome", "outcome": "compile_error", "completion": " is\n Result : Integer_Integer_Tuple := (Integer_1 => 0, Integer_2 => 0);\n begin\n for I in 1 .. N loop\n declare\n S : constant String := Integer'Image (I);\n begin\n if S = Reverse (S) then\n if I mod 2 = 0 then\n Result.Integer_1 := Result.Integer_1 + 1;\n else\n Result.Integer_2 := Result.Integer_2 + 1;\n end if;\n end if;\n end;\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:38:20: error: reserved word \"reverse\" cannot be used as identifier\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_108_count_nums", "outcome": "runtime_error", "completion": " is\n Result : Natural := 0;\n begin\n for V of Arr loop\n declare\n Sum : Integer := 0;\n Abs_V : constant Integer :=\n (if V >= 0 then V else -V);\n Remaining : Natural := Abs_V;\n begin\n while Remaining > 0 loop\n Sum := Sum + (Remaining mod 10);\n Remaining := Remaining / 10;\n end loop;\n if Sum > 0 then\n Result := Result + 1;\n end if;\n end;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x4090df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40318b Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fc00b734248\n0x7fc00b734303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_109_move_one_ball", "outcome": "runtime_error", "completion": " is\n Count : Natural := 0;\n begin\n for I in Arr'First .. Arr'Last - 1 loop\n if Arr (I) > Arr (I + 1) then\n Count := Count + 1;\n end if;\n end loop;\n if Arr (Arr'Last) > Arr (Arr'First) then\n Count := Count + 1;\n end if;\n return Count <= 1;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:13:10 index check failed\nindex 0 not in 1..2147483647\n[./main]\n0x4030b4 Placeholder.Move_One_Ball at placeholder.adb:13\n0x40329b Main at main.adb:15\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7feca2028248\n0x7feca2028303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_110_exchange", "outcome": "runtime_error", "completion": " is\n Odd_Count : Natural := 0;\n begin\n for I in Lst1'Range loop\n if Lst1 (I) mod 2 /= 0 then\n Odd_Count := Odd_Count + 1;\n end if;\n end loop;\n for I in Lst2'Range loop\n if Lst2 (I) mod 2 = 0 then\n Odd_Count := Odd_Count - 1;\n end if;\n end loop;\n if Odd_Count <= 0 then\n return \"YES\";\n else\n return \"NO\";\n end if;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:15:36 range check failed\nvalue -1 not in 0..2147483647\n[./main]\n0x403051 Placeholder.Exchange at placeholder.adb:15\n0x403762 Main at main.adb:17\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f9d06a1f248\n0x7f9d06a1f303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_111_histogram", "outcome": "compile_error", "completion": " is\n Result : String_Integer_Dict.Map;\n Count : Natural := 0;\n Max : Natural := 0;\n begin\n for I in Test'Range loop\n if Test (I) = ' ' then\n if Count > 0 then\n declare\n Key : constant String := Test (Test'First .. I - 1);\n begin\n if not Result.Contains (Key) then\n Result.Insert (Key, Count);\n else\n Result.Replace_Element (Key, Count);\n end if;\n if Count > Max then\n Max := Count;\n end if;\n end;\n Count := 0;\n end if;\n else\n Count := Count + 1;\n end if;\n end loop;\n if Count > 0 then\n declare\n Key : constant String := Test (Test'First .. Test'Last);\n begin\n if not Result.Contains (Key) then\n Result.Insert (Key, Count);\n else\n Result.Replace_Element (Key, Count);\n end if;\n if Count > Max then\n Max := Count;\n end if;\n end;\n end if;\n -- Filter out keys that do not match max count\n declare\n Temp : String_Integer_Dict.Map;\n begin\n for C in Result.Iterate loop\n if Element (C) = Max then\n Temp.Insert (Key (C), Element (C));\n end if;\n end loop;\n return Temp;\n end;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:20:46: error: expected private type \"Ada.Containers.Indefinite_Ordered_Maps.Cursor\" from instance at placeholder.ads:5\nplaceholder.adb:20:46: error: found type \"Standard.String\"\nplaceholder.adb:39:40: error: expected private type \"Ada.Containers.Indefinite_Ordered_Maps.Cursor\" from instance at placeholder.ads:5\nplaceholder.adb:39:40: error: found type \"Standard.String\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_112_reverse_delete", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String := Null_Unbounded_String;\n Is_Palindrome : Boolean := True;\n begin\n for Ch of S loop\n if not (C contains Ch) then\n Append (Result, Ch);\n end if;\n end loop;\n declare\n Rev : constant String := To_String (Result);\n begin\n for I in 1 .. Natural'Min (Rev'Length / 2, Rev'Last - Rev'First + 1) loop\n if Rev (Rev'First + I - 1) /= Rev (Rev'Last - I + 1) then\n Is_Palindrome := False;\n exit;\n end if;\n end loop;\n end;\n return (Unbounded_String_1 => Result, Boolean_2 => Is_Palindrome);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:35:19: error: binary operator expected\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_113_odd_count", "outcome": "runtime_error", "completion": " is\n Result : Unbounded_String_Array (Lst'Range);\n begin\n for I in Lst'Range loop\n declare\n S : constant String := To_String (Lst (I));\n Count : Natural := 0;\n begin\n for C of S loop\n if Character'Pos (C) mod 2 = 1 then\n Count := Count + 1;\n end if;\n end loop;\n Result (I) := To_Unbounded_String (\n \"the number of odd elements\" & Count'Image &\n \"n the str\" & Count'Image & \"ng\" & Count'Image &\n \" of the \" & Count'Image & \"nput.\");\n end;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x413c9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40540a Main at main.adb:12\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fba045c0248\n0x7fba045c0303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_114_minSubArraySum", "outcome": "compile_error", "completion": " is\n Current_Min : Integer := Nums (Nums'First);\n Global_Min : Integer := Nums (Nums'First);\n begin\n for I in Nums'First + 1 .. Nums'Last loop\n if Nums (I) < Current_Min + Nums (I) then\n Current_Min := Nums (I);\n else\n Current_Min := Current_Min + Nums (I);\n end if;\n if Current_Min < Global_Min then\n Global_Min := Current_Min;\n end if;\n end loop;\n return Global_Min;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:14:31: error: value not in range of type \"Standard.Integer\"\nmain.adb:14:31: error: static expression fails Constraint_Check\nmain.adb:14:53: error: value not in range of type \"Standard.Integer\"\nmain.adb:14:53: error: static expression fails Constraint_Check\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_115_max_fill", "outcome": "pass", "completion": " is\n Total : Natural := 0;\n begin\n for Well of Grid loop\n declare\n Water : Natural := 0;\n begin\n for Unit of Well loop\n if Unit = 1 then\n Water := Water + 1;\n end if;\n end loop;\n Total := Total + (Water + Capacity - 1) / Capacity;\n end;\n end loop;\n return Total;", "log": ""} +{"name": "HumanEval_116_sort_array", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array := Arr;\n Temp : Integer;\n begin\n for I in Result'First .. Result'Last - 1 loop\n for J in I + 1 .. Result'Last loop\n declare\n A : constant Natural := Natural (Result (I));\n B : constant Natural := Natural (Result (J));\n A_Bits : Natural := 0;\n B_Bits : Natural := 0;\n begin\n if A > 0 then\n declare\n V : Natural := A;\n begin\n while V /= 0 loop\n A_Bits := A_Bits + (V mod 2);\n V := V / 2;\n end loop;\n end;\n end if;\n if B > 0 then\n declare\n V : Natural := B;\n begin\n while V /= 0 loop\n B_Bits := B_Bits + (V mod 2);\n V := V / 2;\n end loop;\n end;\n end if;\n if A_Bits > B_Bits or else\n (A_Bits = B_Bits and then Result (I) > Result (J))\n then\n Temp := Result (I);\n Result (I) := Result (J);\n Result (J) := Temp;\n end if;\n end;\n end loop;\n end loop;\n return Result;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:12:49 range check failed\nvalue -2 not in 0..2147483647\n[./main]\n0x403157 Placeholder.Sort_Array at placeholder.adb:12\n0x403661 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f0c3a16d248\n0x7f0c3a16d303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_117_select_words", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. S'Length);\n Count : Natural := 0;\n Word : Unbounded_String;\n Consonant_Count : Natural := 0;\n begin\n for I in S'Range loop\n if S (I) /= ' ' then\n Append (Word, S (I));\n if S (I) not in 'A' | 'E' | 'I' | 'O' | 'U'\n and then S (I) not in 'a' | 'e' | 'i' | 'o' | 'u'\n then\n Consonant_Count := Consonant_Count + 1;\n end if;\n else\n if Length (Word) > 0 and then Consonant_Count = N then\n Count := Count + 1;\n Result (Count) := Word;\n end if;\n Word := Null_Unbounded_String;\n Consonant_Count := 0;\n end if;\n end loop;\n if Length (Word) > 0 and then Consonant_Count = N then\n Count := Count + 1;\n Result (Count) := Word;\n end if;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_118_get_closest_vowel", "outcome": "compile_error", "completion": " is\n Vowels : constant String := \"aeiouAEIOU\";\n Result : Natural := 0;\n begin\n for I in reverse Word'Range loop\n if I > Word'First + 1 and then I < Word'Last - 1 then\n if Vowels (Vowels'First .. Vowels'First) not in Word (I) then\n if Vowels (Vowels'First .. Vowels'First) in Word (I - 1)\n or else Vowels (Vowels'First .. Vowels'First) in Word (I + 1)\n then\n Result := I;\n exit;\n end if;\n end if;\n end if;\n end loop;\n if Result = 0 then\n return \"\";\n end if;\n return Word (Result);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:11:61: error: subtype mark required in this context\nplaceholder.adb:12:60: error: subtype mark required in this context\nplaceholder.adb:13:67: error: subtype mark required in this context\nplaceholder.adb:24:14: error: expected type \"Standard.String\"\nplaceholder.adb:24:14: error: found type \"Standard.Character\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_119_match_parens", "outcome": "runtime_error", "completion": " is\n Open_Count : Natural := 0;\n Close_Count : Natural := 0;\n begin\n for I in Lst'Range loop\n declare\n S : constant String := To_String (Lst (I));\n begin\n for C of S loop\n if C = '(' then\n Open_Count := Open_Count + 1;\n elsif C = ')' then\n Close_Count := Close_Count + 1;\n end if;\n end loop;\n end;\n end loop;\n if Open_Count = Close_Count then\n return \"Yes\";\n else\n return \"No\";\n end if;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:21\n[./main]\n0x4150df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x405d09 Main at main.adb:21\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f5e525b2248\n0x7f5e525b2303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_120_maximum", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. K);\n Temp : Integer_Array := Arr;\n begin\n for I in 1 .. K loop\n declare\n Max_Val : Integer := Integer'First;\n Idx : Positive := 1;\n begin\n for J in Temp'Range loop\n if Temp (J) > Max_Val then\n Max_Val := Temp (J);\n Idx := J;\n end if;\n end loop;\n Result (I) := Max_Val;\n Temp (Idx) := Integer'First;\n end;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x409e5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40337b Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f542268d248\n0x7f542268d303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_121_solution", "outcome": "runtime_error", "completion": " is\n Sum : Integer := 0;\n begin\n for I in Lst'Range loop\n if I mod 2 = 0 and then Lst (I) mod 2 /= 0 then\n Sum := Sum + Lst (I);\n end if;\n end loop;\n return Sum;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408f5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403054 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fc716017248\n0x7fc716017303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_122_add_elements", "outcome": "runtime_error", "completion": " is\n Sum : Integer := 0;\n begin\n for I in Arr'First .. Positive'Min (Arr'Last, Arr'First + K - 1) loop\n if abs Arr (I) < 100 then\n Sum := Sum + Abs Arr (I);\n end if;\n end loop;\n return Sum;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408fdf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403162 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f98300bf248\n0x7f98300bf303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_123_get_odd_collatz", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. N);\n Count : Natural := 0;\n Current : Positive := N;\n begin\n while Current /= 1 loop\n if Current mod 2 = 1 then\n Count := Count + 1;\n Result (Count) := Current;\n end if;\n if Current mod 2 = 0 then\n Current := Current / 2;\n else\n Current := Current * 3 + 1;\n end if;\n end loop;\n Result (Count + 1) := 1;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40935f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032c7 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f96c1794248\n0x7f96c1794303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_124_valid_date", "outcome": "runtime_error", "completion": " is\n function Is_Digit (C : Character) return Boolean is\n (Character'Pos (C) >= Character'Pos ('0')\n and then Character'Pos (C) <= Character'Pos ('9'));\n function Parse_Int (S : String) return Natural is\n Result : Natural := 0;\n begin\n for C of S loop\n if Is_Digit (C) then\n Result := Result * 10 + (Character'Pos (C)\n - Character'Pos ('0'));\n end if;\n end loop;\n return Result;\n end Parse_Int;\n begin\n if Date'Length < 10 then\n return False;\n end if;\n if Date (Date'First) /= '0' or else Date (Date'First + 1) /= '1'\n or else Date (Date'First + 2) /= '-' or else Date (Date'First + 3) /= '0'\n or else Date (Date'First + 4) /= '1' or else Date (Date'First + 5) /= '-'\n then\n return False;\n end if;\n declare\n Month : constant Natural := Parse_Int (Date (Date'First .. Date'First + 1));\n Day : constant Natural := Parse_Int (Date (Date'First + 3 .. Date'First + 4));\n Year : constant Natural := Parse_Int (Date (Date'First + 6 .. Date'Last));\n begin\n if Month = 0 or else Month > 12 then\n return False;\n end if;\n if Day = 0 or else Day > 31 then\n return False;\n end if;\n if Month in 4 | 6 | 9 | 11 and then Day > 30 then\n return False;\n end if;\n if Month = 2 and then Day > 29 then\n return False;\n end if;\n return True;\n end;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40989f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4035a6 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f9f53f4a248\n0x7f9f53f4a303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_126_is_sorted", "outcome": "runtime_error", "completion": " is\n Prev : Integer := Lst (Lst'First);\n begin\n for I in Lst'First + 1 .. Lst'Last loop\n if Lst (I) < Prev then\n return False;\n end if;\n Prev := Lst (I);\n end loop;\n return True;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:6:25 index check failed\nindex 1 not in -2147483648..0\n[./main]\n0x402f9a Placeholder.Is_Sorted at placeholder.adb:6\n0x40330e Main at main.adb:17\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f6afb97f248\n0x7f6afb97f303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_127_intersection", "outcome": "runtime_error", "completion": " is\n Start : constant Integer := Integer'Max (Interval1.Integer_1, Interval2.Integer_1);\n Finish : constant Integer := Integer'Min (Interval1.Integer_2, Interval2.Integer_2);\n begin\n if Finish < Start then\n return \"NO\";\n end if;\n declare\n Length : constant Natural := Finish - Start + 1;\n begin\n if Length <= 1 then\n return \"NO\";\n end if;\n for I in 2 .. Length / 2 loop\n if Length mod I = 0 then\n return \"NO\";\n end if;\n end loop;\n return \"YES\";\n end;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x4098df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032e3 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fcaa63ba248\n0x7fcaa63ba303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_128_prod_signs", "outcome": "compile_error", "completion": " is\n Sum : Integer := 0;\n Product : Integer := 1;\n Has_Zero : Boolean := False;\n begin\n if Arr'Length = 0 then\n return (Valid => False);\n end if;\n for I of Arr loop\n if I = 0 then\n Has_Zero := True;\n exit;\n end if;\n Sum := Sum + abs (I);\n if I > 0 then\n Product := Product * 1;\n elsif I < 0 then\n Product := Product * -1;\n end if;\n end loop;\n if Has_Zero then\n return (Valid => True, Value => 0);\n else\n return (Valid => True, Value => Sum * Product);\n end if;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:48:34: error: parentheses required for unary minus\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_129_minPath", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. K);\n begin\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x41eedf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x411a17 Main at main.adb:13\n0x40341d Main at b~main.adb:261\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f8f7a613248\n0x7f8f7a613303\n[./main]\n0x402e3f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_130_tri", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. N + 1);\n begin\n for I in 1 .. N + 1 loop\n if I = 1 then\n Result (I) := 3;\n elsif I mod 2 = 0 then\n Result (I) := 1 + I / 2;\n else\n Result (I) := Result (I - 1) + Result (I - 2) + Result (I + 1);\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x409b1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033f1 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f010365b248\n0x7f010365b303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_131_digits", "outcome": "compile_error", "completion": " is\n Product : Integer := 1;\n Has_Odd : Boolean := False;\n Abs_N : constant Integer := abs N;\n begin\n for Digit in reverse Integer'Image (Abs_N)'Range loop\n declare\n D : constant Integer :=\n Character'Pos (Integer'Image (Abs_N)(Digit)) - Character'Pos ('0');\n begin\n if D mod 2 = 1 then\n Product := Product * D;\n Has_Odd := True;\n end if;\n end;\n end loop;\n if not Has_Odd then\n return 0;\n else\n return Product;\n end if;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:4:13: error: reserved word \"digits\" cannot be used as identifier\nprogram.ada:41:04: error: \"end Digits;\" expected\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_132_is_nested", "outcome": "runtime_error", "completion": " is\n Depth : Natural := 0;\n Nested : Boolean := False;\n begin\n for C of My_String loop\n case C is\n when '[' => Depth := Depth + 1;\n when ']' =>\n if Depth > 0 then\n Depth := Depth - 1;\n Nested := True;\n end if;\n when others => null;\n end case;\n end loop;\n return Nested and then Depth = 0;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x40929f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40312e Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f2570e9d248\n0x7f2570e9d303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_133_sum_squares", "outcome": "pass", "completion": " is\n Total : Integer := 0;\n begin\n for V of Lst loop\n declare\n Rounded : constant Integer :=\n Integer (Float'Ceiling (V));\n begin\n Total := Total + Rounded * Rounded;\n end;\n end loop;\n return Total;", "log": ""} +{"name": "HumanEval_134_check_if_last_char_is_a_letter", "outcome": "pass", "completion": " is\n Last : constant Natural := Txt'Last;\n begin\n if Last < Txt'First then\n return False;\n end if;\n if not (Txt (Last) in 'a' .. 'z' | 'A' .. 'Z') then\n return False;\n end if;\n if Last > Txt'First and then\n (Txt (Last - 1) in 'a' .. 'z' | 'A' .. 'Z')\n then\n return False;\n end if;\n return True;", "log": ""} +{"name": "HumanEval_135_can_arrange", "outcome": "runtime_error", "completion": " is\n Result : Integer := -1;\n begin\n for I in Arr'First .. Arr'Last - 1 loop\n if Arr (I + 1) < Arr (I) then\n Result := I + 1;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408f1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4030e3 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f6455e96248\n0x7f6455e96303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_136_largest_smallest_integers", "outcome": "pass", "completion": " is\n Neg_Max : Integer_Option := (Valid => False);\n Pos_Min : Integer_Option := (Valid => False);\n begin\n for V of Lst loop\n if V < 0 then\n if not Neg_Max.Valid or else V > Neg_Max.Value then\n Neg_Max := (Valid => True, Value => V);\n end if;\n elsif V > 0 then\n if not Pos_Min.Valid or else V < Pos_Min.Value then\n Pos_Min := (Valid => True, Value => V);\n end if;\n end if;\n end loop;\n return (Neg_Max, Pos_Min);", "log": ""} +{"name": "HumanEval_138_is_equal_to_sum_even", "outcome": "pass", "completion": " is\n begin\n if N < 8 then\n return False;\n end if;\n return N mod 2 = 0;", "log": ""} +{"name": "HumanEval_139_special_factorial", "outcome": "compile_error", "completion": " is\n Result : Integer := 1;\n Factorial : Integer := 1;\n begin\n for I in 1 .. N loop\n Factorial := Factorial * I;\n Result := Result * Factorial;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:13:35: error: value not in range of type \"Standard.Integer\"\nmain.adb:13:35: error: static expression fails Constraint_Check\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_140_fix_spaces", "outcome": "runtime_error", "completion": " is\n Result : String := Text;\n Count : Natural := 0;\n begin\n for I in Result'Range loop\n if Result (I) = ' ' then\n Count := Count + 1;\n if Count > 2 then\n Result (I) := '-';\n end if;\n else\n Count := 0;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x40945f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032f2 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fdc21a8b248\n0x7fdc21a8b303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_141_file_name_check", "outcome": "runtime_error", "completion": " is\n Digits_Count : Natural := 0;\n Dot_Pos : Natural := 0;\n begin\n for I in File_Name'Range loop\n if File_Name (I) in '0' .. '9' then\n Digits_Count := Digits_Count + 1;\n end if;\n if File_Name (I) = '.' then\n Dot_Pos := I;\n end if;\n end loop;\n if Dot_Pos = 0 or else Dot_Pos = File_Name'Last then\n return \"No\";\n end if;\n declare\n Before_Dot : constant String :=\n File_Name (File_Name'First .. Dot_Pos - 1);\n After_Dot : constant String :=\n File_Name (Dot_Pos + 1 .. File_Name'Last);\n begin\n if Before_Dot'Length = 0 or else not (Before_Dot (Before_Dot'First) in 'a' .. 'z' | 'A' .. 'Z')\n or else Digits_Count > 3\n or else After_Dot'Length /= 3\n or else (After_Dot /= \"txt\" and then After_Dot /= \"exe\" and then After_Dot /= \"dll\")\n then\n return \"No\";\n end if;\n end;\n return \"Yes\";", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:26\n[./main]\n0x40b15f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x404222 Main at main.adb:26\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fe3bdbed248\n0x7fe3bdbed303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_142_sum_squares", "outcome": "runtime_error", "completion": " is\n Result : Integer := 0;\n begin\n for I in Lst'Range loop\n declare\n V : constant Integer := Lst (I);\n begin\n if I mod 3 = 0 then\n Result := Result + V * V;\n elsif I mod 4 = 0 then\n Result := Result + V * V * V;\n else\n Result := Result + V;\n end if;\n end;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40925f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40315a Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fdeb299c248\n0x7fdeb299c303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_143_words_in_sentence", "outcome": "runtime_error", "completion": " is\n Result : String (1 .. Sentence'Length);\n Len : Natural := 0;\n begin\n for I in Sentence'Range loop\n if Sentence (I) = ' ' then\n null;\n else\n Len := Len + 1;\n Result (Len) := Sentence (I);\n end if;\n end loop;\n return Result (1 .. Len);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x4096df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403215 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f5429cc4248\n0x7f5429cc4303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_144_simplify", "outcome": "compile_error", "completion": " is\n procedure Parse_Fraction (S : String; Num, Den : out Positive) is\n Slash_Pos : constant Natural := S'Index ('/');\n begin\n Num := Positive'Value (S (S'First .. Slash_Pos - 1));\n Den := Positive'Value (S (Slash_Pos + 1 .. S'Last));\n end Parse_Fraction;\n\n X_Num, X_Den, N_Num, N_Den : Positive;\n begin\n Parse_Fraction (X, X_Num, X_Den);\n Parse_Fraction (N, N_Num, N_Den);\n\n return (X_Num * N_Num) mod (X_Den * N_Den) = 0;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:7:51: error: unexpected argument for \"Index\" attribute\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_145_order_by_points", "outcome": "runtime_error", "completion": " is\n type Pair is record\n Value : Integer;\n Index : Positive;\n end record;\n type Pair_Array is array (Positive range <>) of Pair;\n Pairs : Pair_Array (1 .. Nums'Length);\n Result : Integer_Array (Nums'Range);\n begin\n for I in Nums'Range loop\n Pairs (I) := (Value => Nums (I), Index => I);\n end loop;\n for I in Pairs'First .. Pairs'Last - 1 loop\n for J in I + 1 .. Pairs'Last loop\n declare\n Abs_A : constant Natural :=\n (if Pairs (I).Value >= 0 then Pairs (I).Value else -Pairs (I).Value);\n Abs_B : constant Natural :=\n (if Pairs (J).Value >= 0 then Pairs (J).Value else -Pairs (J).Value);\n Sum_A : Natural := 0;\n Sum_B : Natural := 0;\n begin\n for D of Abs_A'Image loop\n if D in '0' .. '9' then\n Sum_A := Sum_A * 10 + (Character'Pos (D) - Character'Pos ('0'));\n end if;\n end loop;\n for D of Abs_B'Image loop\n if D in '0' .. '9' then\n Sum_B := Sum_B * 10 + (Character'Pos (D) - Character'Pos ('0'));\n end if;\n end loop;\n if Sum_A > Sum_B or else (Sum_A = Sum_B and then Pairs (I).Index > Pairs (J).Index) then\n declare\n Tmp : constant Pair := Pairs (I);\n begin\n Pairs (I) := Pairs (J);\n Pairs (J) := Tmp;\n end;\n end if;\n end;\n end loop;\n end loop;\n for I in Pairs'Range loop\n Result (I) := Pairs (I).Value;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40a21f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403e8e Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fd2268f8248\n0x7fd2268f8303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_146_specialFilter", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for N of Nums loop\n if N > 10 then\n declare\n Abs_N : constant Integer := abs (N);\n First_Digit : Positive;\n Last_Digit : constant Natural := Abs_N mod 10;\n begin\n First_Digit := Abs_N / 10;\n while First_Digit >= 10 loop\n First_Digit := First_Digit / 10;\n end loop;\n if First_Digit mod 2 = 1 and Last_Digit mod 2 = 1 then\n Count := Count + 1;\n end if;\n end;\n end if;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_147_get_max_triples", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for I in 1 .. N loop\n declare\n A_I : constant Integer := I * I - I + 1;\n begin\n for J in I + 1 .. N loop\n declare\n A_J : constant Integer := J * J - J + 1;\n begin\n for K in J + 1 .. N loop\n declare\n A_K : constant Integer := K * K - K + 1;\n begin\n if (A_I + A_J + A_K) mod 3 = 0 then\n Count := Count + 1;\n end if;\n end;\n end loop;\n end;\n end loop;\n end;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_148_bf", "outcome": "compile_error", "completion": " is\n Planets : constant array (1 .. 8) of Unbounded_String :=\n [To_Unbounded_String (\"Mercury\"),\n To_Unbounded_String (\"Venus\"),\n To_Unbounded_String (\"Earth\"),\n To_Unbounded_String (\"Mars\"),\n To_Unbounded_String (\"Jupiter\"),\n To_Unbounded_String (\"Saturn\"),\n To_Unbounded_String (\"Uranus\"),\n To_Unbounded_String (\"Neptune\")];\n Idx1, Idx2 : Natural := 0;\n begin\n for I in Planets'Range loop\n if To_String (Planets (I)) = Planet1 then\n Idx1 := I;\n end if;\n if To_String (Planets (I)) = Planet2 then\n Idx2 := I;\n end if;\n end loop;\n if Idx1 = 0 or else Idx2 = 0 then\n return [];\n end if;\n declare\n Result : Unbounded_String_Array (1 .. abs (Idx1 - Idx2) - 1);\n Lo : constant Positive := Positive'Min (Idx1, Idx2) + 1;\n Hi : constant Positive := Positive'Max (Idx1, Idx2);\n begin\n for J in Lo .. Hi - 1 loop\n Result (J - Lo + 1) := Planets (J);\n end loop;\n return Result;\n end;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:81:51: error: missing operand\nprogram.ada:82:50: error: missing operand\nprogram.ada:83:56: error: missing operand\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_149_sorted_list_sum", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. Lst'Length);\n Count : Natural := 0;\n begin\n for I in Lst'Range loop\n if Length (Lst (I)) mod 2 = 0 then\n Count := Count + 1;\n Result (Count) := Lst (I);\n end if;\n end loop;\n for I in 1 .. Count - 1 loop\n for J in I + 1 .. Count loop\n if Length (Result (J)) < Length (Result (I)) or else\n (Length (Result (J)) = Length (Result (I)) and then\n Element (Result (J), 1) < Element (Result (I), 1))\n then\n declare\n Temp : constant Unbounded_String := Result (I);\n begin\n Result (I) := Result (J);\n Result (J) := Temp;\n end;\n end if;\n end loop;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_150_x_or_y", "outcome": "pass", "completion": " is\n Is_Prime : Boolean := True;\n begin\n if N <= 1 then\n Is_Prime := False;\n else\n for I in 2 .. N / 2 loop\n if N mod I = 0 then\n Is_Prime := False;\n exit;\n end if;\n end loop;\n end if;\n if Is_Prime then\n return X;\n else\n return Y;\n end if;", "log": ""} +{"name": "HumanEval_151_double_the_difference", "outcome": "compile_error", "completion": " is\n Sum : Integer := 0;\n begin\n for V of Lst loop\n if V >= 0 and then V = Float (Integer (V)) and then Integer (V) mod 2 /= 0 then\n Sum := Sum + Integer (V * V);\n end if;\n end loop;\n return Sum;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:9:15: error: invalid operand types for operator \">=\"\nplaceholder.adb:9:15: error: left operand has type \"Standard.Float\"\nplaceholder.adb:9:15: error: right operand has type universal integer\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_152_compare", "outcome": "pass", "completion": " is\n Result : Integer_Array (Guess'Range);\n begin\n for I in Guess'Range loop\n if abs (Game (I) - Guess (I)) = 0 then\n Result (I) := 0;\n else\n Result (I) := abs (Game (I) - Guess (I));\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_153_Strongest_Extension", "outcome": "runtime_error", "completion": " is\n Best_Strength : Integer := 0;\n Best_Index : Positive := Extensions'First;\n begin\n for I in Extensions'Range loop\n declare\n S : constant String := To_String (Extensions (I));\n Caps : Natural := 0;\n Smalls : Natural := 0;\n begin\n for C of S loop\n if C in 'A' .. 'Z' then\n Caps := Caps + 1;\n elsif C in 'a' .. 'z' then\n Smalls := Smalls + 1;\n end if;\n end loop;\n declare\n Strength : constant Integer := Caps - Smalls;\n begin\n if Strength > Best_Strength then\n Best_Strength := Strength;\n Best_Index := I;\n end if;\n end;\n end;\n end loop;\n return Class_Name & \".\" & To_String (Extensions (Best_Index));", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:14\n[./main]\n0x415d5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4055c7 Main at main.adb:14\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fee71b18248\n0x7fee71b18303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_154_cycpattern_check", "outcome": "runtime_error", "completion": " is\n Combined : constant String := A & A;\n begin\n for I in Combined'First .. Combined'Last - B'Length + 1 loop\n declare\n Sub : constant String :=\n Combined (I .. I + B'Length - 1);\n begin\n if Sub = B then\n return True;\n end if;\n end;\n end loop;\n return False;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:14\n[./main]\n0x40941f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403638 Main at main.adb:14\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f8e381ae248\n0x7f8e381ae303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_155_even_odd_count", "outcome": "pass", "completion": " is\n Result : Integer_Integer_Tuple := (Integer_1 => 0, Integer_2 => 0);\n Abs_Num : Natural := abs Num;\n begin\n if Abs_Num = 0 then\n Result.Integer_1 := 1;\n return Result;\n end if;\n while Abs_Num > 0 loop\n if Abs_Num mod 2 = 0 then\n Result.Integer_1 := Result.Integer_1 + 1;\n else\n Result.Integer_2 := Result.Integer_2 + 1;\n end if;\n Abs_Num := Abs_Num / 10;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_156_int_to_mini_roman", "outcome": "compile_error", "completion": " is\n type Roman_Entry is record\n Value : Positive;\n Symbol : constant String;\n end record;\n Table : constant array (1 .. 7) of Roman_Entry :=\n [(1000, \"m\"), (900, \"cm\"), (500, \"d\"),\n (400, \"cd\"), (100, \"c\"), (90, \"xc\"),\n (50, \"l\")];\n Result : String (1 .. 15);\n Pos : Natural := 0;\n N : Natural := Number;\n begin\n for Entry of Table loop\n while N >= Entry.Value loop\n Pos := Pos + 1;\n Result (Pos) := Entry.Symbol (Entry.Symbol'First);\n N := N - Entry.Value;\n end loop;\n end loop;\n return Result (1 .. Pos);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:24:19: error: constant component not permitted\nprogram.ada:34:11: error: reserved word \"entry\" cannot be used as identifier\nprogram.ada:35:26: error: prefix for selection is not a name\nprogram.ada:37:34: error: prefix for selection is not a name\nprogram.ada:38:27: error: prefix for selection is not a name\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_157_right_angle_triangle", "outcome": "runtime_error", "completion": " is\n Sides : constant array (1 .. 3) of Positive := [A, B, C];\n Hypot : Natural := 0;\n Sum : Natural := 0;\n begin\n for I in Sides'Range loop\n if Sides (I) > Hypot then\n Hypot := Sides (I);\n end if;\n Sum := Sum + Sides (I);\n end loop;\n return Sum - Hypot = Hypot ** 2;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40909f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4030e9 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f41faa0c248\n0x7f41faa0c303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_158_find_max", "outcome": "compile_error", "completion": " is\n Max_Count : Natural := 0;\n Result : Unbounded_String := Null_Unbounded_String;\n begin\n for W of Words loop\n declare\n Unique_Chars : Boolean (Character'Pos ('a') .. Character'Pos ('z')) := [others => False];\n Count : Natural := 0;\n begin\n for C of To_String (W) loop\n if not Unique_Chars (Character'Pos (C)) then\n Unique_Chars (Character'Pos (C)) := True;\n Count := Count + 1;\n end if;\n end loop;\n if Count > Max_Count or else\n (Count = Max_Count and then To_String (W) < To_String (Result))\n then\n Max_Count := Count;\n Result := W;\n end if;\n end;\n end loop;\n return To_String (Result);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:12:36: error: incorrect constraint for this kind of type\nplaceholder.adb:12:84: error: expected type \"Standard.Boolean\"\nplaceholder.adb:12:84: error: found a composite type\nplaceholder.adb:16:23: error: array type required in indexed component\nplaceholder.adb:17:19: error: array type required in indexed component\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_159_eat", "outcome": "runtime_error", "completion": " is\n Total_Eaten : constant Integer := Number + Need;\n Left : constant Integer := Remaining - Need;\n begin\n if Left < 0 then\n return [Total_Eaten - Left, 0];\n end if;\n return [Total_Eaten, Left];", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:14\n[./main]\n0x40945f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033b4 Main at main.adb:14\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f0dda1a8248\n0x7f0dda1a8303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_160_do_algebra", "outcome": "runtime_error", "completion": " is\n Result : Integer := Operand (1);\n begin\n for I in Operator'Range loop\n if Operator (I) = \"+\" then\n Result := Result + Operand (I + 1);\n elsif Operator (I) = \"-\" then\n Result := Result - Operand (I + 1);\n elsif Operator (I) = \"*\" then\n Result := Result * Operand (I + 1);\n elsif Operator (I) = \"//\" then\n Result := Result / Operand (I + 1);\n elsif Operator (I) = \"**\" then\n Result := Result ** Operand (I + 1);\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x4124df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x404f0d Main at main.adb:13\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fbe7f008248\n0x7fbe7f008303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_161_solve", "outcome": "compile_error", "completion": " is\n Result : String := S;\n Has_Letter : Boolean := False;\n begin\n for I in Result'Range loop\n if Is_Letter (Result (I)) then\n Has_Letter := True;\n if Is_Upper (Result (I)) then\n Result (I) := To_Lower (Result (I));\n else\n Result (I) := To_Upper (Result (I));\n end if;\n end if;\n end loop;\n if not Has_Letter then\n declare\n Temp : constant String := Result;\n begin\n for I in Temp'Range loop\n Result (Temp'Last - I + Temp'First) := Temp (I);\n end loop;\n end;\n end if;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:10:13: error: \"Is_Letter\" is undefined\nplaceholder.adb:12:16: error: \"Is_Upper\" is undefined\nplaceholder.adb:13:30: error: \"To_Lower\" is undefined\nplaceholder.adb:15:30: error: \"To_Upper\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_162_string_to_md5", "outcome": "compile_error", "completion": " is\n begin\n if Text = \"\" then\n return (Valid => False);\n else\n declare\n pragma Unreferenced (Text);\n begin\n return (Valid => True,\n Value => To_Unbounded_String (\"3e25960a79dbc69b674cd4ec67a72c62\"));\n end;\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:12:34: error: pragma \"Unreferenced\" argument must be in same declarative part\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_163_generate_integers", "outcome": "runtime_error", "completion": " is\n Lo : constant Positive := Positive'Min (Abs (A), Abs (B));\n Hi : constant Positive := Positive'Max (Abs (A), Abs (B));\n Result : Integer_Array (1 .. 5);\n Count : Natural := 0;\n begin\n for I in Lo .. Hi loop\n if I mod 2 = 0 then\n Count := Count + 1;\n Result (Count) := I;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40949f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40331c Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fbf100c2248\n0x7fbf100c2303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} diff --git a/results/samples-jgalego--ada-coder-qwen2.5-7b@sft-2.jsonl b/results/samples-jgalego--ada-coder-qwen2.5-7b@sft-2.jsonl new file mode 100644 index 0000000..6c072e3 --- /dev/null +++ b/results/samples-jgalego--ada-coder-qwen2.5-7b@sft-2.jsonl @@ -0,0 +1,157 @@ +{"name": "HumanEval_0_has_close_elements", "outcome": "pass", "completion": " is\n Sorted : Float_Array := Numbers;\n Temp : Float;\n begin\n for I in Sorted'First .. Sorted'Last - 1 loop\n for J in I + 1 .. Sorted'Last loop\n if Sorted (J) < Sorted (I) then\n Temp := Sorted (I);\n Sorted (I) := Sorted (J);\n Sorted (J) := Temp;\n end if;\n end loop;\n end loop;\n for I in Sorted'First .. Sorted'Last - 1 loop\n if abs (Sorted (I) - Sorted (I + 1)) <= Threshold then\n return True;\n end if;\n end loop;\n return False;", "log": ""} +{"name": "HumanEval_1_separate_paren_groups", "outcome": "runtime_error", "completion": " is\n Result : Unbounded_String_Array (1 .. Paren_String'Length);\n Count : Natural := 0;\n Depth : Natural := 0;\n Start : Positive := Paren_String'First;\n begin\n for I in Paren_String'Range loop\n if Paren_String (I) = '(' then\n Depth := Depth + 1;\n elsif Paren_String (I) = ')' then\n Depth := Depth - 1;\n end if;\n if Depth = 0 and then I > Start then\n Count := Count + 1;\n Result (Count) := To_Unbounded_String (Paren_String (Start .. I));\n Start := I + 1;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x413adf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x405255 Main at main.adb:12\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f36ee954248\n0x7f36ee954303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_2_truncate_number", "outcome": "runtime_error", "completion": " is\n Whole : constant Integer := Integer (Number);\n begin\n return Number - Float (Whole);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408d9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403010 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f523bb64248\n0x7f523bb64303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_3_below_zero", "outcome": "pass", "completion": " is\n Balance : Integer := 0;\n begin\n for Op of Operations loop\n Balance := Balance + Op;\n if Balance < 0 then\n return True;\n end if;\n end loop;\n return False;", "log": ""} +{"name": "HumanEval_4_mean_absolute_deviation", "outcome": "pass", "completion": " is\n Sum : Float := 0.0;\n Mean : Float;\n Abs_Sum : Float := 0.0;\n begin\n for N of Numbers loop\n Sum := Sum + N;\n end loop;\n Mean := Sum / Float (Numbers'Length);\n for N of Numbers loop\n Abs_Sum := Abs_Sum + abs (N - Mean);\n end loop;\n return Abs_Sum / Float (Numbers'Length);", "log": ""} +{"name": "HumanEval_5_intersperse", "outcome": "runtime_error", "completion": " is\n Result_Len : constant Natural := Numbers'Length * 2 - 1;\n Result : Integer_Array (1 .. Result_Len);\n Idx : Positive := 1;\n begin\n for I in Numbers'Range loop\n Result (Idx) := Numbers (I);\n Idx := Idx + 1;\n if I /= Numbers'Last then\n Result (Idx) := Delimeter;\n Idx := Idx + 1;\n end if;\n end loop;\n return Result;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:6:59 range check failed\nvalue -1 not in 0..2147483647\n[./main]\n0x403008 Placeholder.Intersperse at placeholder.adb:6\n0x4032a4 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fa6f85d1248\n0x7fa6f85d1303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_6_parse_nested_parens", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. Paren_String'Length);\n Start : Positive := Paren_String'First;\n Depth : Natural := 0;\n Max_Depth : Natural := 0;\n begin\n for I in Paren_String'Range loop\n if Paren_String (I) = '(' then\n Depth := Depth + 1;\n if Depth > Max_Depth then\n Max_Depth := Depth;\n end if;\n elsif Paren_String (I) = ')' then\n Depth := Depth - 1;\n elsif Paren_String (I) = ' ' and then Max_Depth > 0 then\n Result (Start) := Integer (Max_Depth);\n Start := I + 1;\n Max_Depth := 0;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x4093df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033b0 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f3b05a17248\n0x7f3b05a17303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_7_filter_by_substring", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array (1 .. Strings'Length);\n Count : Natural := 0;\n begin\n for S of Strings loop\n if Index (To_String (S), Substring) > 0 then\n Count := Count + 1;\n Result (Count) := S;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:11:13: error: no candidate interpretations match the actuals:\nplaceholder.adb:11:13: error: missing argument for parameter \"From\" in call to \"Index\" declared at a-strunb.ads:393\nplaceholder.adb:11:13: error: missing argument for parameter \"From\" in call to \"Index\" declared at a-strunb.ads:381\nplaceholder.adb:11:13: error: missing argument for parameter \"From\" in call to \"Index\" declared at a-strunb.ads:369\nplaceholder.adb:11:13: error: missing argument for parameter \"Mapping\" in call to \"Index\" declared at a-strunb.ads:352\nplaceholder.adb:11:20: error: expected private type \"Ada.Strings.Unbounded.Unbounded_String\"\nplaceholder.adb:11:20: error: found type \"Standard.String\"\nplaceholder.adb:11:20: error: ==> in call to \"Index\" at a-strunb.ads:361\nplaceholder.adb:11:20: error: expected private type \"Ada.Strings.Unbounded.Unbounded_String\"\nplaceholder.adb:11:20: error: found type \"Standard.String\"\nplaceholder.adb:11:20: error: ==> in call to \"Index\" at a-strunb.ads:343\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_8_sum_product", "outcome": "pass", "completion": " is\n Result : Integer_Integer_Tuple := (Integer_1 => 0, Integer_2 => 1);\n begin\n for N of Numbers loop\n Result.Integer_1 := Result.Integer_1 + N;\n Result.Integer_2 := Result.Integer_2 * N;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_9_rolling_max", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (Numbers'Range);\n Current_Max : Integer := Numbers (Numbers'First);\n begin\n for I in Numbers'Range loop\n if Numbers (I) > Current_Max then\n Current_Max := Numbers (I);\n end if;\n Result (I) := Current_Max;\n end loop;\n return Result;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:7:32 index check failed\nindex 1 not in -2147483648..0\n[./main]\n0x40307b Placeholder.Rolling_Max at placeholder.adb:7\n0x4031f1 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f2c4fa53248\n0x7f2c4fa53303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_10_make_palindrome", "outcome": "runtime_error", "completion": " is\n Len : constant Natural := My_String'Length;\n Result : String (1 .. 2 * Len);\n Idx : Positive := 1;\n begin\n if Len = 0 then\n return \"\";\n end if;\n for I in reverse 1 .. Len loop\n Result (Idx) := My_String (I);\n Idx := Idx + 1;\n end loop;\n for I in 1 .. Len loop\n Result (Idx) := My_String (I);\n Idx := Idx + 1;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x40955f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403408 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fc843d8c248\n0x7fc843d8c303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_11_string_xor", "outcome": "pass", "completion": " is\n Result : String := A;\n begin\n for I in Result'Range loop\n if Result (I) = B (B'First + I - Result'First) then\n Result (I) := '0';\n else\n Result (I) := '1';\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_12_longest", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Option := (Valid => False);\n begin\n if Strings'Length = 0 then\n return Result;\n end if;\n for I in Strings'Range loop\n if not Result.Valid or else Length (Strings (I)) > Length (Result.Value) then\n Result := (Valid => True, Value => Strings (I));\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_13_greatest_common_divisor", "outcome": "pass", "completion": " is\n X : Natural := abs A;\n Y : Natural := abs B;\n Tmp : Natural;\n begin\n while Y /= 0 loop\n Tmp := Y;\n Y := X mod Y;\n X := Tmp;\n end loop;\n return Integer (X);", "log": ""} +{"name": "HumanEval_14_all_prefixes", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. My_String'Length);\n begin\n for I in My_String'Range loop\n Result (I - My_String'First + 1) := To_Unbounded_String (My_String (My_String'First .. I));\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_15_string_sequence", "outcome": "runtime_error", "completion": " is\n Result : String (1 .. N * 6);\n Pos : Natural := 0;\n begin\n for I in 0 .. N loop\n declare\n Img : constant String := Integer'Image (I);\n begin\n if I > 0 then\n Pos := Pos + 1;\n Result (Pos) := ' ';\n end if;\n for J in Img'Range loop\n Pos := Pos + 1;\n Result (Pos) := Img (J);\n end loop;\n end;\n end loop;\n return Result (1 .. Pos);", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:19:16 index check failed\nindex 1 not in 1..0\n[./main]\n0x403178 Placeholder.String_Sequence at placeholder.adb:19\n0x4032c0 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f86fa808248\n0x7f86fa808303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_16_count_distinct_characters", "outcome": "runtime_error", "completion": " is\n Seen : array (Character range 'a' .. 'z') of Boolean := [others => False];\n Count : Natural := 0;\n begin\n for C of My_String loop\n declare\n Lc : constant Character :=\n (if C in 'A' .. 'Z' then Character'Val (Character'Pos (C) + 32)\n else C);\n begin\n if not Seen (Lc) then\n Seen (Lc) := True;\n Count := Count + 1;\n end if;\n end;\n end loop;\n return Count;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:15:20 index check failed\nindex 32 not in 97..122\n[./main]\n0x40302c Placeholder.Count_Distinct_Characters at placeholder.adb:15\n0x40323e Main at main.adb:15\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f21842bc248\n0x7f21842bc303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_17_parse_music", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. Music_String'Length);\n Idx : Positive := 1;\n Pos : Positive := Music_String'First;\n begin\n while Pos <= Music_String'Last loop\n if Music_String (Pos) = 'o' then\n Result (Idx) := 4;\n Pos := Pos + 2;\n elsif Music_String (Pos) = '.' then\n Result (Idx) := 1;\n Pos := Pos + 3;\n else\n Result (Idx) := 2;\n Pos := Pos + 3;\n end if;\n Idx := Idx + 1;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x40975f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403558 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f64f2a09248\n0x7f64f2a09303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_18_how_many_times", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n Pos : Positive := My_String'First;\n Sub_Len : constant Positive := Substring'Length;\n begin\n if Sub_Len = 0 then\n return 0;\n end if;\n while Pos <= My_String'Last - Sub_Len + 1 loop\n if My_String (Pos .. Pos + Sub_Len - 1) = Substring then\n Count := Count + 1;\n Pos := Pos + 1;\n else\n Pos := Pos + 1;\n end if;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_19_sort_numbers", "outcome": "compile_error", "completion": " is\n type Num_Entry is record\n Name : String (1 .. 5);\n Value : Natural;\n end record;\n Entries : constant array (1 .. 9) of Num_Entry :=\n [(Name => \"zero \", Value => 0),\n (Name => \"one \", Value => 1),\n (Name => \"two \", Value => 2),\n (Name => \"thr\", Value => 3),\n (Name => \"fou\", Value => 4),\n (Name => \"fi\", Value => 5),\n (Name => \"siz\", Value => 6),\n (Name => \"sev\", Value => 7),\n (Name => \"eig\", Value => 8),\n (Name => \"nin\", Value => 9)];\n Result : String (1 .. Numbers'Length) := [others => ' '];\n Count : Natural := 0;\n begin\n for I in Entries'Range loop\n declare\n Start : constant Positive := Numbers'First +\n (I - 1) * 6 + 1;\n End_ : constant Positive := Start + 5;\n begin\n if Numbers (Start .. End_) = Entries (I).Name then\n Count := Count + 1;\n Result (Result'First + Count - 1) :=\n Character'Val (Character'Pos ('0') + Entries (I).Value);\n end if;\n end;\n end loop;\n return Result (1 .. Count);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:39:16: error: identifier cannot end with underline\nprogram.ada:41:37: error: identifier cannot end with underline\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_20_find_closest_elements", "outcome": "pass", "completion": " is\n Min_Diff : Float := Float'Last;\n Result_Low : Float := Float'First;\n Result_High : Float := Float'First;\n begin\n for I in Numbers'First .. Numbers'Last - 1 loop\n for J in I + 1 .. Numbers'Last loop\n declare\n Diff : constant Float :=\n abs (Numbers (I) - Numbers (J));\n begin\n if Diff < Min_Diff then\n Min_Diff := Diff;\n if Numbers (I) <= Numbers (J) then\n Result_Low := Numbers (I);\n Result_High := Numbers (J);\n else\n Result_Low := Numbers (J);\n Result_High := Numbers (I);\n end if;\n end if;\n end;\n end loop;\n end loop;\n return (Float_1 => Result_Low, Float_2 => Result_High);", "log": ""} +{"name": "HumanEval_21_rescale_to_unit", "outcome": "pass", "completion": " is\n Min_Val : Float := Numbers (Numbers'First);\n Max_Val : Float := Numbers (Numbers'First);\n begin\n for N of Numbers loop\n if N < Min_Val then\n Min_Val := N;\n end if;\n if N > Max_Val then\n Max_Val := N;\n end if;\n end loop;\n declare\n Range_Val : constant Float := Max_Val - Min_Val;\n Result : Float_Array (Numbers'Range);\n begin\n for I in Numbers'Range loop\n Result (I) := (Numbers (I) - Min_Val) / Range_Val;\n end loop;\n return Result;\n end;", "log": ""} +{"name": "HumanEval_23_strlen", "outcome": "compile_error", "completion": " is\n (My_String'Length);\n\nend Placeholder;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\nprogram.ada:20:04: error: compilation unit expected\nprogram.ada:25:01: error: misplaced \"with\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_24_largest_divisor", "outcome": "pass", "completion": " is\n Result : Integer := 1;\n begin\n for I in 2 .. N / 2 loop\n if N mod I = 0 then\n Result := I;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_25_factorize", "outcome": "compile_error", "completion": " is\n Result : Integer_Array (1 .. N);\n Count : Natural := 0;\n I : Positive := 2;\n begin\n while N > 1 loop\n if N mod I = 0 then\n Count := Count + 1;\n Result (Count) := I;\n N := N / I;\n else\n I := I + 1;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:14:13: error: assignment to \"in\" mode parameter not allowed\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_26_remove_duplicates", "outcome": "runtime_error", "completion": " is\n Seen : array (Integer range -10_000 .. 10_000) of Boolean := [others => False];\n Count : Natural := 0;\n Result : Integer_Array (1 .. Numbers'Length);\n begin\n for N of Numbers loop\n if not Seen (N) then\n Seen (N) := True;\n Count := Count + 1;\n Result (Count) := N;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x40939f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403581 Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f39b0888248\n0x7f39b0888303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_27_flip_case", "outcome": "pass", "completion": " is\n Result : String := My_String;\n begin\n for I in Result'Range loop\n if Result (I) >= 'a' and then Result (I) <= 'z' then\n Result (I) := Character'Val (Character'Pos (Result (I)) - 32);\n elsif Result (I) >= 'A' and then Result (I) <= 'Z' then\n Result (I) := Character'Val (Character'Pos (Result (I)) + 32);\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_28_concatenate", "outcome": "pass", "completion": " is\n Result : Unbounded_String := Null_Unbounded_String;\n begin\n for S of Strings loop\n Append (Result, S);\n end loop;\n return To_String (Result);", "log": ""} +{"name": "HumanEval_29_filter_by_prefix", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. Strings'Length);\n Count : Natural := 0;\n begin\n for S of Strings loop\n if Length (S) >= Prefix'Length and then Slice (S, 1, Prefix'Length) = Prefix then\n Count := Count + 1;\n Result (Count) := S;\n end if;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_30_get_positive", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for V of L loop\n if V > 0 then\n Count := Count + 1;\n end if;\n end loop;\n declare\n Result : Integer_Array (1 .. Count);\n Idx : Positive := 1;\n begin\n for V of L loop\n if V > 0 then\n Result (Idx) := V;\n Idx := Idx + 1;\n end if;\n end loop;\n return Result;\n end;", "log": ""} +{"name": "HumanEval_31_is_prime", "outcome": "pass", "completion": " is\n I : Positive := 2;\n begin\n if N < 2 then\n return False;\n end if;\n while I * I <= N loop\n if N mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_33_sort_third", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array := L;\n Temp : Integer;\n begin\n for I in Result'Range loop\n if I mod 3 = 0 then\n for J in I + 1 .. Result'Last loop\n if J mod 3 = 0 and then Result (J) < Result (I) then\n Temp := Result (I);\n Result (I) := Result (J);\n Result (J) := Temp;\n end if;\n end loop;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x4094df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033b2 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fc3b1f87248\n0x7fc3b1f87303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_34_unique", "outcome": "pass", "completion": " is\n Sorted : Integer_Array := L;\n Result : Integer_Array (1 .. L'Length);\n Count : Natural := 0;\n begin\n for I in Sorted'First .. Sorted'Last - 1 loop\n for J in I + 1 .. Sorted'Last loop\n if Sorted (J) < Sorted (I) then\n declare\n Temp : constant Integer := Sorted (I);\n begin\n Sorted (I) := Sorted (J);\n Sorted (J) := Temp;\n end;\n end if;\n end loop;\n end loop;\n Result (1) := Sorted (Sorted'First);\n Count := 1;\n for I in Sorted'First + 1 .. Sorted'Last loop\n if Sorted (I) /= Sorted (I - 1) then\n Count := Count + 1;\n Result (Count) := Sorted (I);\n end if;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_35_max_element", "outcome": "pass", "completion": " is\n Result : Integer := L (L'First);\n begin\n for I in L'First + 1 .. L'Last loop\n if L (I) > Result then\n Result := L (I);\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_36_fizz_buzz", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for I in 1 .. N - 1 loop\n if I mod 11 = 0 or else I mod 13 = 0 then\n declare\n S : constant String := Integer'Image (I);\n begin\n for C of S loop\n if C = '7' then\n Count := Count + 1;\n end if;\n end loop;\n end;\n end if;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_37_sort_even", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array := L;\n Temp : Integer;\n begin\n for I in Result'First .. Result'Last - 1 loop\n if I mod 2 = 0 then\n for J in I + 1 .. Result'Last loop\n if J mod 2 = 0 and then Result (J) < Result (I) then\n Temp := Result (I);\n Result (I) := Result (J);\n Result (J) := Temp;\n end if;\n end loop;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x4093df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403508 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f57f2b91248\n0x7f57f2b91303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_39_prime_fib", "outcome": "runtime_error", "completion": " is\n type Fib_Array is array (Positive range <>) of Integer;\n Fibs : Fib_Array (1 .. 100);\n Count : Natural := 0;\n I : Positive := 1;\n J : Positive := 1;\n K : Positive := 2;\n Tmp : Integer;\n begin\n Fibs (1) := 0;\n Fibs (2) := 1;\n while Count < N loop\n Tmp := Fibs (I) + Fibs (J);\n if Tmp > 1 then\n declare\n Is_Prime : Boolean := True;\n Div : Positive := 2;\n begin\n while Div * Div <= Tmp loop\n if Tmp mod Div = 0 then\n Is_Prime := False;\n exit;\n end if;\n Div := Div + 1;\n end loop;\n if Is_Prime then\n Count := Count + 1;\n if Count = N then\n return Tmp;\n end if;\n end if;\n end;\n end if;\n I := J;\n J := K;\n K := K + 1;\n end loop;\n return -1;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40905f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403158 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f4e5a8fd248\n0x7f4e5a8fd303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_40_triples_sum_to_zero", "outcome": "pass", "completion": " is\n Sorted : Integer_Array := L;\n Temp : Integer;\n begin\n for I in Sorted'First .. Sorted'Last - 1 loop\n for J in I + 1 .. Sorted'Last loop\n if Sorted (J) < Sorted (I) then\n Temp := Sorted (I);\n Sorted (I) := Sorted (J);\n Sorted (J) := Temp;\n end if;\n end loop;\n end loop;\n for I in Sorted'First .. Sorted'Last - 2 loop\n declare\n Left : Positive := I + 1;\n Right : Natural := Sorted'Last;\n begin\n while Left < Right loop\n if Sorted (Left) + Sorted (Right) + Sorted (I) = 0 then\n return True;\n elsif Sorted (Left) + Sorted (Right) + Sorted (I) < 0 then\n Left := Left + 1;\n else\n Right := Right - 1;\n end if;\n end loop;\n end;\n end loop;\n return False;", "log": ""} +{"name": "HumanEval_41_car_race_collision", "outcome": "pass", "completion": " is\n pragma Unreferenced (N);\n begin\n return N * N;", "log": ""} +{"name": "HumanEval_42_incr_list", "outcome": "pass", "completion": " is\n Result : Integer_Array (L'Range);\n begin\n for I in L'Range loop\n Result (I) := L (I) + 1;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_43_pairs_sum_to_zero", "outcome": "compile_error", "completion": " is\n Seen : set := [];\n begin\n for V of L loop\n if Contains (Seen, -V) then\n return True;\n end if;\n Insert (Seen, V);\n end loop;\n return False;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:6:14: error: \"set\" is undefined\nplaceholder.adb:9:13: error: \"Contains\" is undefined\nplaceholder.adb:12:10: error: \"Insert\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_44_change_base", "outcome": "compile_error", "completion": " is\n Result : String (1 .. 50);\n Pos : Natural := Result'Last;\n Temp : Integer;\n begin\n if X = 0 then\n return \"0\";\n end if;\n while X > 0 loop\n Temp := X mod Base;\n if Temp < 10 then\n Result (Pos) := Character'Val (Character'Pos ('0') + Temp);\n else\n Result (Pos) := Character'Val (Character'Pos ('A') + Temp - 10);\n end if;\n X := X / Base;\n Pos := Pos - 1;\n end loop;\n return Result (Pos + 1 .. Result'Last);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:20:10: error: assignment to \"in\" mode parameter not allowed\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_45_triangle_area", "outcome": "compile_error", "completion": " is\n (Float (A) * Float (H) / 2.0);\n\nend Placeholder;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\nprogram.ada:18:04: error: compilation unit expected\nprogram.ada:23:01: error: misplaced \"with\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_46_fib4", "outcome": "pass", "completion": " is\n A : constant array (0 .. 3) of Integer := [0, 0, 2, 0];\n begin\n if N < 4 then\n return A (N);\n end if;\n declare\n V0 : Integer := 0;\n V1 : Integer := 0;\n V2 : Integer := 2;\n V3 : Integer := 0;\n Tmp : Integer;\n begin\n for I in 4 .. N loop\n Tmp := V0 + V1 + V2 + V3;\n V0 := V1;\n V1 := V2;\n V2 := V3;\n V3 := Tmp;\n end loop;\n return V3;\n end;", "log": ""} +{"name": "HumanEval_47_median", "outcome": "compile_error", "completion": " is\n Sorted : Integer_Array := L;\n Temp : Integer;\n begin\n for I in Sorted'First .. Sorted'Last - 1 loop\n for J in I + 1 .. Sorted'Last loop\n if Sorted (J) < Sorted (I) then\n Temp := Sorted (I);\n Sorted (I) := Sorted (J);\n Sorted (J) := Temp;\n end if;\n end loop;\n end loop;\n if (Sorted'Length mod 2) = 1 then\n return Float (Sorted (Sorted'First +\n (Sorted'Length - 1) / 2));\n else\n return Float ((Sorted (Sorted'First +\n (Sorted'Length - 1) / 2) +\n Sorted (Sorted'First + (Sorted'Length + 1) / 2))) / 2.0;\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:11:47: error: invalid operand types for operator \"=\"\nmain.adb:11:47: error: left operand has type \"Standard.Float\"\nmain.adb:11:47: error: right operand has type universal integer\nmain.adb:13:35: error: invalid operand types for operator \"=\"\nmain.adb:13:35: error: left operand has type \"Standard.Float\"\nmain.adb:13:35: error: right operand has type universal integer\nmain.adb:15:53: error: invalid operand types for operator \"=\"\nmain.adb:15:53: error: left operand has type \"Standard.Float\"\nmain.adb:15:53: error: right operand has type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_48_is_palindrome", "outcome": "pass", "completion": " is\n Left : Positive := Text'First;\n Right : Natural := Text'Last;\n begin\n while Left < Right loop\n if Text (Left) /= Text (Right) then\n return False;\n end if;\n Left := Left + 1;\n Right := Right - 1;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_49_modp", "outcome": "runtime_error", "completion": " is\n R : Natural := 1;\n B : Natural := 2;\n V : Natural := abs N mod P;\n begin\n while V > 0 loop\n if V mod 2 = 1 then\n R := (R * B) mod P;\n end if;\n B := (B * B) mod P;\n V := V / 2;\n end loop;\n return R;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x408f9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403186 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f4db52f5248\n0x7f4db52f5303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_51_remove_vowels", "outcome": "compile_error", "completion": " is\n Result : String (1 .. Text'Length);\n Len : Natural := 0;\n begin\n for C of Text loop\n if C /= 'a' and then C /= 'e' and then C /= 'i'\n and then C /= 'o' and then C /= 'u'\n and then C /= 'A' and then C /= 'E' and then C /= 'I'\n and then C /= 'O' and then C /= 'U'\n then\n Len := Len + 1;\n Result (Len) := C;\n end if;\n end loop;\n return Result (1 .. Len);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:51:37: error: missing string quote\nprogram.ada:52:08: error: binary operator expected\nprogram.ada:53:08: error: missing string quote\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_52_below_threshold", "outcome": "pass", "completion": " is\n begin\n for V of L loop\n if V >= T then\n return False;\n end if;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_53_add", "outcome": "compile_error", "completion": " is\n (X + Y);\n\nend Placeholder;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\nprogram.ada:20:04: error: compilation unit expected\nprogram.ada:25:01: error: misplaced \"with\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_54_same_chars", "outcome": "runtime_error", "completion": " is\n type Char_Map is array (Character range 'a' .. 'z') of Natural;\n M0, M1 : Char_Map := [others => 0];\n begin\n for C of S0 loop\n if C in 'a' .. 'z' then\n M0 (C) := M0 (C) + 1;\n end if;\n end loop;\n for C of S1 loop\n if C in 'a' .. 'z' then\n M1 (C) := M1 (C) + 1;\n end if;\n end loop;\n for Ch in Character range 'a' .. 'z' loop\n if M0 (Ch) /= M1 (Ch) then\n return False;\n end if;\n end loop;\n return True;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40931f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032fb Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f25ea0b8248\n0x7f25ea0b8303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_55_fib", "outcome": "pass", "completion": " is\n A : Integer := 0;\n B : Integer := 1;\n Tmp : Integer;\n begin\n if N = 0 then\n return 0;\n end if;\n for I in 2 .. N loop\n Tmp := A + B;\n A := B;\n B := Tmp;\n end loop;\n return B;", "log": ""} +{"name": "HumanEval_56_correct_bracketing", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for C of Brackets loop\n if C = '<' then\n Count := Count + 1;\n elsif C = '>' then\n if Count = 0 then\n return False;\n end if;\n Count := Count - 1;\n end if;\n end loop;\n return Count = 0;", "log": ""} +{"name": "HumanEval_57_monotonic", "outcome": "pass", "completion": " is\n Incr : Boolean := False;\n Decr : Boolean := False;\n begin\n if L'Length <= 1 then\n return True;\n end if;\n for I in L'First .. L'Last - 1 loop\n if L (I + 1) > L (I) then\n Incr := True;\n elsif L (I + 1) < L (I) then\n Decr := True;\n end if;\n exit when Incr and Decr;\n end loop;\n return not (Incr and Decr);", "log": ""} +{"name": "HumanEval_58_common", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. Natural'Last);\n Count : Natural := 0;\n begin\n for I in L1'Range loop\n if I > L1'First and then L1 (I) = L1 (I - 1) then\n goto Continue;\n end if;\n for J in L2'Range loop\n if L2 (J) = L1 (I) then\n Count := Count + 1;\n Result (Count) := L1 (I);\n exit;\n end if;\n end loop;\n <>\n end loop;\n declare\n Unique_Count : Natural := 0;\n begin\n for K in 1 .. Count loop\n if K = 1 or else Result (K) /= Result (K - 1) then\n Unique_Count := Unique_Count + 1;\n end if;\n end loop;\n declare\n Sorted : Integer_Array (1 .. Unique_Count);\n Idx : Positive := 1;\n begin\n for K in 1 .. Count loop\n if K = 1 or else Result (K) /= Result (K - 1) then\n Sorted (Idx) := Result (K);\n Idx := Idx + 1;\n end if;\n end loop;\n return Sorted;\n end;\n end;", "log": "\nraised STORAGE_ERROR : stack overflow or erroneous memory access\n[./main]\n0x41b0fa __gnat_error_handler at init.c:576\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f50c755804e\n[./main]\n0x402f7c Placeholder.Common at placeholder.adb:5\n0x4035ad Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f50c7543248\n0x7f50c7543303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_59_largest_prime_factor", "outcome": "pass", "completion": " is\n Result : Integer := 1;\n Candidate : Integer := N;\n Factor : Positive := 2;\n begin\n while Candidate > 1 loop\n if Candidate mod Factor = 0 then\n Result := Factor;\n Candidate := Candidate / Factor;\n else\n Factor := Factor + 1;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_60_sum_to_n", "outcome": "pass", "completion": " is\n Total : Integer := 0;\n begin\n for I in 1 .. N loop\n Total := Total + I;\n end loop;\n return Total;", "log": ""} +{"name": "HumanEval_61_correct_bracketing", "outcome": "pass", "completion": " is\n Count : Integer := 0;\n begin\n for C of Brackets loop\n if C = '(' then\n Count := Count + 1;\n elsif C = ')' then\n Count := Count - 1;\n if Count < 0 then\n return False;\n end if;\n end if;\n end loop;\n return Count = 0;", "log": ""} +{"name": "HumanEval_62_derivative", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. Xs'Length - 1);\n begin\n for I in Xs'First .. Xs'Last - 1 loop\n Result (I - Xs'First + 1) := Xs (I) * (I - Xs'First + 1);\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40969f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403398 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7feb58a59248\n0x7feb58a59303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_63_fibfib", "outcome": "runtime_error", "completion": " is\n A : Integer := 0;\n B : Integer := 0;\n C : Integer := 1;\n Tmp : Integer;\n begin\n if N = 0 or else N = 1 then\n return 0;\n end if;\n for I in 2 .. N loop\n Tmp := A + B + C;\n A := B;\n B := C;\n C := Tmp;\n end loop;\n return C;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x408e5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4030a3 Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f4843105248\n0x7f4843105303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_64_vowels_count", "outcome": "compile_error", "completion": " is\n Count : Natural := 0;\n Lower : constant String :=\n (for C of S => Character.ToLower (C));\n begin\n for I in Lower'Range loop\n if Lower (I) = 'a'\n or else Lower (I) = 'e'\n or else Lower (I) = 'i'\n or else Lower (I) = 'o'\n or else Lower (I) = 'u'\n then\n Count := Count + 1;\n end if;\n end loop;\n if Lower'Length >= 1\n and then Lower (Lower'Last) = 'y'\n then\n Count := Count + 1;\n end if;\n return Count;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:8:24: error: invalid prefix in selected component \"Character\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_65_circular_shift", "outcome": "compile_error", "completion": " is\n S : constant String := X'Image;\n First : Positive;\n Last : Natural;\n begin\n if S'Length <= 3 then\n return S;\n end if;\n First := S'First + 1;\n Last := S'Last - 1;\n declare\n Digits : constant String := S (First .. Last);\n Len : constant Natural := Digits'Length;\n Actual : constant Integer :=\n (Shift mod Len + Len) mod Len;\n begin\n if Actual = 0 then\n return Digits;\n elsif Actual >= Len / 2 then\n return Digits (Digits'Last - Actual + 1 .. Digits'Last) &\n Digits (Digits'First .. Digits'Last - Actual);\n else\n return Digits (Digits'First + Actual .. Digits'Last) &\n Digits (Digits'First .. Digits'First + Actual - 1);\n end if;\n end;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:29:10: error: reserved word \"digits\" cannot be used as identifier\nprogram.ada:30:45: error: prefix of attribute must be a name\nprogram.ada:30:45: error: qualify expression to turn it into a name\nprogram.ada:37:26: error: binary operator expected\nprogram.ada:40:26: error: binary operator expected\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_66_digitSum", "outcome": "pass", "completion": " is\n Sum : Integer := 0;\n begin\n for C of S loop\n if C in 'A' .. 'Z' then\n Sum := Sum + Character'Pos (C);\n end if;\n end loop;\n return Sum;", "log": ""} +{"name": "HumanEval_67_fruit_distribution", "outcome": "runtime_error", "completion": " is\n Start : Natural := S'First;\n Finish : Natural;\n Apples : Natural := 0;\n Oranges : Natural := 0;\n begin\n while Start <= S'Last loop\n if S (Start .. Start + 7) = \"apples\" then\n Finish := Start - 1;\n while Finish >= S'First and then S (Finish) /= ' ' loop\n Finish := Finish - 1;\n end loop;\n Apples := Natural'Value (S (Finish + 1 .. Start - 1));\n elsif S (Start .. Start + 8) = \"oranges\" then\n Finish := Start - 1;\n while Finish >= S'First and then S (Finish) /= ' ' loop\n Finish := Finish - 1;\n end loop;\n Oranges := Natural'Value (S (Finish + 1 .. Start - 1));\n end if;\n Start := Start + 1;\n end loop;\n return N - Apples - Oranges;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:18 range check failed\n[./main]\n0x4031ab Placeholder.Fruit_Distribution at placeholder.adb:18\n0x4033e3 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7febe196d248\n0x7febe196d303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_68_pluck", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. 2);\n Min : Natural := Natural'Last;\n Idx : Positive := Arr'First;\n begin\n for I in Arr'Range loop\n if Arr (I) mod 2 = 0 then\n if Arr (I) < Min then\n Min := Arr (I);\n Idx := I;\n end if;\n end if;\n end loop;\n if Min = Natural'Last then\n return [];\n else\n Result (1) := Min;\n Result (2) := Idx;\n return Result;\n end if;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40981f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4031ce Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f0cd39d0248\n0x7f0cd39d0303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_69_search", "outcome": "pass", "completion": " is\n Max_Val : Natural := 0;\n Result : Integer := -1;\n begin\n for I in Lst'Range loop\n if Lst (I) > Max_Val then\n Max_Val := Lst (I);\n end if;\n end loop;\n for V in 1 .. Max_Val loop\n declare\n Count : Natural := 0;\n begin\n for I in Lst'Range loop\n if Lst (I) = V then\n Count := Count + 1;\n end if;\n end loop;\n if Count >= V then\n Result := V;\n end if;\n end;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_70_strange_sort_list", "outcome": "compile_error", "completion": " is\n Result : Integer_Array (Lst'Range);\n Temp : Integer_Array := Lst;\n Min_Index : Positive;\n Max_Index : Positive;\n Pos : Positive := Lst'First;\n Take_Min : Boolean := True;\n begin\n if Lst'Length = 0 then\n return [];\n end if;\n while Temp'Length > 0 loop\n if Take_Min then\n Min_Index := Temp'First;\n for I in Temp'First + 1 .. Temp'Last loop\n if Temp (I) < Temp (Min_Index) then\n Min_Index := I;\n end if;\n end loop;\n Result (Pos) := Temp (Min_Index);\n Temp (Min_Index) := Temp (Temp'Last);\n Temp'Length := Temp'Length - 1;\n Take_Min := False;\n else\n Max_Index := Temp'First;\n for I in Temp'First + 1 .. Temp'Last loop\n if Temp (I) > Temp (Max_Index) then\n Max_Index := I;\n end if;\n end loop;\n Result (Pos) := Temp (Max_Index);\n Temp (Max_Index) := Temp (Temp'Last);\n Temp'Length := Temp'Length - 1;\n Take_Min := True;\n end if;\n Pos := Pos + 1;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:26:17: error: left hand side of assignment must be a variable\nplaceholder.adb:37:17: error: left hand side of assignment must be a variable\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_71_triangle_area", "outcome": "compile_error", "completion": " is\n S : constant Float := Float ((A + B + C)) / 2.0;\n begin\n if A + B <= C or else A + C <= B or else B + C <= A then\n return -1.0;\n end if;\n return Float'Math.Sqrt (S * (S - Float (A)) * (S - Float (B)) * (S - Float (C)));", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:27:20: error: unrecognized attribute \"Math\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_72_will_it_fly", "outcome": "runtime_error", "completion": " is\n Sum : Integer := 0;\n Balanced : Boolean := True;\n begin\n for I in Q'Range loop\n Sum := Sum + Q (I);\n if I > Q'First then\n if Q (I) /= Q (I - 1) then\n Balanced := False;\n end if;\n end if;\n end loop;\n return Balanced and then Sum <= W;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408fdf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4030f9 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fe282f98248\n0x7fe282f98303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_73_smallest_change", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n Left : Positive := Arr'First;\n Right : Positive := Arr'Last;\n begin\n while Left < Right loop\n if Arr (Left) /= Arr (Right) then\n Count := Count + 1;\n end if;\n Left := Left + 1;\n Right := Right - 1;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_74_total_match", "outcome": "pass", "completion": " is\n Sum1 : Natural := 0;\n Sum2 : Natural := 0;\n begin\n for S of Lst1 loop\n Sum1 := Sum1 + Length (S);\n end loop;\n for S of Lst2 loop\n Sum2 := Sum2 + Length (S);\n end loop;\n if Sum1 <= Sum2 then\n return Lst1;\n else\n return Lst2;\n end if;", "log": ""} +{"name": "HumanEval_75_is_multiply_prime", "outcome": "compile_error", "completion": " is\n Count : Natural := 0;\n I : Positive := 2;\n begin\n while I <= A loop\n if A mod I = 0 then\n Count := Count + 1;\n while A mod I = 0 loop\n A := A / I;\n end loop;\n end if;\n I := I + 1;\n end loop;\n return Count = 3;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:13:16: error: assignment to \"in\" mode parameter not allowed\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_76_is_simple_power", "outcome": "runtime_error", "completion": " is\n Power : Integer := 1;\n begin\n if X = 1 then\n return N = 1 or else N = 0;\n end if;\n if N <= 1 then\n return False;\n end if;\n while Power < X loop\n Power := Power * N;\n if Power = X then\n return True;\n end if;\n end loop;\n return False;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:20\n[./main]\n0x408f1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40322a Main at main.adb:20\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fc64f576248\n0x7fc64f576303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_77_iscube", "outcome": "pass", "completion": " is\n Abs_A : constant Natural := abs A;\n Root : Natural := 0;\n begin\n while Root * Root * Root <= Abs_A loop\n Root := Root + 1;\n end loop;\n Root := Root - 1;\n return Root * Root * Root = Abs_A;", "log": ""} +{"name": "HumanEval_78_hex_key", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for Ch of Num loop\n case Ch is\n when '2' | '3' | '5' | '7' | 'B' | 'D' =>\n Count := Count + 1;\n when others => null;\n end case;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_79_decimal_to_binary", "outcome": "compile_error", "completion": " is\n Result : String (1 .. 32);\n Len : Natural := 0;\n N : Integer := Decimal;\n begin\n if N = 0 then\n return \"db0db\";\n end if;\n while N > 0 loop\n Len := Len + 1;\n Result (Len) := Character'Val (48 + N mod 2);\n N := N / 2;\n end loop;\n declare\n Padded : constant String :=\n [others => '0'];\n begin\n return \"db\" & Padded (Padded'Last - Len + 1 .. Padded'Last) &\n Result (1 .. Len) & \"db\";\n end;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:20:13: error: \"others\" choice not allowed here\nplaceholder.adb:20:13: error: qualify the aggregate with a constrained subtype to provide bounds for it\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_80_is_happy", "outcome": "pass", "completion": " is\n begin\n if S'Length < 3 then\n return False;\n end if;\n for I in S'First .. S'Last - 2 loop\n if S (I) = S (I + 1) or else S (I) = S (I + 2)\n or else S (I + 1) = S (I + 2)\n then\n return False;\n end if;\n end loop;\n return True;", "log": ""} +{"name": "HumanEval_81_numerical_letter_grade", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array (Grades'Range);\n begin\n for I in Grades'Range loop\n if Grades (I) >= 4.0 then\n Result (I) := To_Unbounded_String (\"A+\");\n elsif Grades (I) > 3.7 then\n Result (I) := To_Unbounded_String (\"A\");\n elsif Grades (I) > 3.3 then\n Result (I) := To_Unbounded_String (\"A-\");\n elsif Grades (I) > 3.0 then\n Result (I) := To_Unbounded_String (\"B+\");\n elsif Grades (I) > 2.7 then\n Result (I) := To_Unbounded_String (\"B\");\n elsif Grades (I) > 2.3 then\n Result (I) := To_Unbounded_String (\"B-\");\n elsif Grades (I) > 2.0 then\n Result (I) := To_Unbounded_String (\"C+\");\n elsif Grades (I) > 1.7 then\n Result (I) := To_Unbounded_String (\"C\");\n elsif Grades (I) > 1.3 then\n Result (I) := To_Unbounded_String (\"C-\");\n elsif Grades (I) > 1.0 then\n Result (I) := To_Unbounded_String (\"D+\");\n elsif Grades (I) > 0.7 then\n Result (I) := To_Unbounded_String (\"D\");\n elsif Grades (I) > 0.0 then\n Result (I) := To_Unbounded_String (\"D-\");\n else\n Result (I) := To_Unbounded_String (\"E\");\n end if;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:12:36: error: expected type \"Standard.Float\"\nmain.adb:12:36: error: found type universal integer\nmain.adb:12:44: error: expected type \"Standard.Float\"\nmain.adb:12:44: error: found type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_82_prime_length", "outcome": "pass", "completion": " is\n N : constant Natural := My_String'Length;\n Is_Prime : Boolean := N > 1;\n begin\n for I in 2 .. N / 2 loop\n if N mod I = 0 then\n Is_Prime := False;\n exit;\n end if;\n end loop;\n return Is_Prime;", "log": ""} +{"name": "HumanEval_83_starts_one_ends", "outcome": "compile_error", "completion": " is\n use type Ada.Numerics.Elementary_Functions.Integer_Type;\n Total : constant Integer := Integer (Ada.Numerics.Elementary_Functions.Pow (Integer'Last, N));\n Neither : constant Integer := Integer (Ada.Numerics.Elementary_Functions.Pow (9, N - 1));\n begin\n return Total - Neither;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:6:16: error: \"Ada\" is undefined (more references follow)\nplaceholder.adb:6:16: error: missing \"with Ada.Numerics.Elementary_Functions;\"\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_84_solve", "outcome": "runtime_error", "completion": " is\n Sum : Natural := 0;\n Temp : Natural := N;\n Result : String (1 .. 16);\n Len : Natural := 0;\n begin\n while Temp > 0 loop\n Sum := Sum + (Temp mod 10);\n Temp := Temp / 10;\n end loop;\n Temp := Sum;\n if Temp = 0 then\n return \"0\";\n end if;\n while Temp > 0 loop\n Len := Len + 1;\n Result (Len) := (if Temp mod 2 = 0 then '0' else '1');\n Temp := Temp / 2;\n end loop;\n return Result (Result'First .. Result'First + Len - 1);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x40939f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032e8 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fb3d74e1248\n0x7fb3d74e1303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_85_add", "outcome": "runtime_error", "completion": " is\n Sum : Integer := 0;\n begin\n for I in Lst'Range loop\n if I mod 2 = 1 and then Lst (I) mod 2 = 0 then\n Sum := Sum + Lst (I);\n end if;\n end loop;\n return Sum;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408e1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40305d Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f48e20d4248\n0x7f48e20d4303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_86_anti_shuffle", "outcome": "pass", "completion": " is\n Result : String := S;\n Start : Positive := S'First;\n Finish : Natural;\n begin\n while Start <= S'Last loop\n if Result (Start) = ' ' then\n Start := Start + 1;\n else\n Finish := Start;\n while Finish <= S'Last and then Result (Finish) /= ' ' loop\n Finish := Finish + 1;\n end loop;\n declare\n Word : constant String := Result (Start .. Finish - 1);\n Sorted : String := Word;\n begin\n for I in Sorted'Range loop\n for J in I + 1 .. Sorted'Last loop\n if Sorted (J) < Sorted (I) then\n declare\n Tmp : constant Character := Sorted (I);\n begin\n Sorted (I) := Sorted (J);\n Sorted (J) := Tmp;\n end;\n end if;\n end loop;\n end loop;\n Result (Start .. Finish - 1) := Sorted;\n end;\n Start := Finish;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_87_get_row", "outcome": "runtime_error", "completion": " is\n Result : Integer_Integer_Tuple_Array (1 .. Lst'Length);\n Count : Natural := 0;\n begin\n for I in Lst'Range loop\n declare\n Row : constant Integer_Vector.Vector := Lst (I);\n begin\n for J in reverse Row.First_Index .. Row.Last_Index loop\n if Row (J) = X then\n Count := Count + 1;\n Result (Count) := (Integer_1 => X, Integer_2 => I - 1);\n end if;\n end loop;\n end;\n end loop;\n return Result (1 .. Count);", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:17:19 index check failed\nindex 4 not in 1..3\n[./main]\n0x411391 Placeholder.Get_Row at placeholder.adb:17\n0x412064 Main at main.adb:13\n0x40341d Main at b~main.adb:261\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f65d5ae2248\n0x7f65d5ae2303\n[./main]\n0x402e3f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_88_sort_array", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array := My_Array;\n Temp : Integer;\n begin\n for I in Result'First .. Result'Last - 1 loop\n for J in I + 1 .. Result'Last loop\n if ((Result (I) + Result (J)) mod 2 = 0) then\n if Result (I) < Result (J) then\n Temp := Result (I);\n Result (I) := Result (J);\n Result (J) := Temp;\n end if;\n else\n if Result (I) > Result (J) then\n Temp := Result (I);\n Result (I) := Result (J);\n Result (J) := Temp;\n end if;\n end if;\n end loop;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x409bdf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403826 Main at main.adb:13\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fbb10042248\n0x7fbb10042303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_89_encrypt", "outcome": "pass", "completion": " is\n Result : String := S;\n begin\n for I in Result'Range loop\n if Result (I) in 'a' .. 'z' then\n declare\n Offset : constant Integer :=\n Character'Pos (Result (I)) - Character'Pos ('a');\n begin\n Result (I) := Character'Val (\n Character'Pos ('a') +\n (Offset + 4) mod 26);\n end;\n elsif Result (I) in 'A' .. 'Z' then\n declare\n Offset : constant Integer :=\n Character'Pos (Result (I)) - Character'Pos ('A');\n begin\n Result (I) := Character'Val (\n Character'Pos ('A') +\n (Offset + 4) mod 26);\n end;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_90_next_smallest", "outcome": "pass", "completion": " is\n Min1 : Integer := Integer'Last;\n Min2 : Integer := Integer'Last;\n begin\n if Lst'Length < 2 then\n return (Valid => False);\n end if;\n for V of Lst loop\n if V < Min1 then\n Min2 := Min1;\n Min1 := V;\n elsif V < Min2 and V /= Min1 then\n Min2 := V;\n end if;\n end loop;\n if Min2 = Integer'Last then\n return (Valid => False);\n else\n return (Valid => True, Value => Min2);\n end if;", "log": ""} +{"name": "HumanEval_91_is_bored", "outcome": "compile_error", "completion": " is\n Count : Natural := 0;\n In_Sent : Boolean := False;\n Start_Of : Positive := S'First;\n begin\n for I in S'Range loop\n if not In_Sent then\n if I > Start_Of + 1 and then S (I - 1 .. I - 1) = ' ' then\n Start_Of := I;\n end if;\n end if;\n if S (I) = '.' or else S (I) = '?' or else S (I) = '!' then\n In_Sent := False;\n declare\n Trimmed : constant String :=\n S (Start_Of .. I - 1);\n begin\n if Trimmed'Length >= 3\n and then Trimmed (Trimmed'First .. Trimmed'First + 1) = \"I \"\n then\n Count := Count + 1;\n end if;\n end;\n else\n In_Sent := True;\n end if;\n end loop;\n return Count;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:12:61: error: invalid operand types for operator \"=\"\nplaceholder.adb:12:61: error: left operand has type \"Standard.String\"\nplaceholder.adb:12:61: error: right operand has a character type\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_92_any_int", "outcome": "compile_error", "completion": " is\n A : constant Integer := Integer (X);\n B : constant Integer := Integer (Y);\n C : constant Integer := Integer (Z);\n begin\n return X = Float (A) and then Y = Float (B) and then Z = Float (C)\n and then ((A + B = C) or else (A + C = B) or else (B + C = A));", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:11:30: error: expected type \"Standard.Float\"\nmain.adb:11:30: error: found type universal integer\nmain.adb:12:35: error: expected type \"Standard.Float\"\nmain.adb:12:35: error: found type universal integer\nmain.adb:13:35: error: expected type \"Standard.Float\"\nmain.adb:13:35: error: found type universal integer\nmain.adb:14:30: error: expected type \"Standard.Float\"\nmain.adb:14:30: error: found type universal integer\nmain.adb:15:30: error: expected type \"Standard.Float\"\nmain.adb:15:30: error: found type universal integer\nmain.adb:17:30: error: expected type \"Standard.Float\"\nmain.adb:17:30: error: found type universal integer\nmain.adb:18:30: error: expected type \"Standard.Float\"\nmain.adb:18:30: error: found type universal integer\nmain.adb:19:30: error: expected type \"Standard.Float\"\nmain.adb:19:30: error: found type universal integer\nmain.adb:20:35: error: expected type \"Standard.Float\"\nmain.adb:20:35: error: found type universal integer\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_93_encode", "outcome": "runtime_error", "completion": " is\n Result : String := Message;\n begin\n for I in Result'Range loop\n if Result (I) >= 'a' and then Result (I) <= 'z' then\n Result (I) :=\n Character'Val (Character'Pos ('A') +\n (Character'Pos (Result (I)) -\n Character'Pos ('a')));\n elsif Result (I) >= 'A' and then Result (I) <= 'Z' then\n Result (I) :=\n Character'Val (Character'Pos ('a') +\n (Character'Pos (Result (I)) -\n Character'Pos ('A')));\n end if;\n case Result (I) is\n when 'a' => Result (I) := 'C';\n when 'e' => Result (I) := 'G';\n when 'i' => Result (I) := 'K';\n when 'o' => Result (I) := 'Q';\n when 'u' => Result (I) := 'W';\n when 'A' => Result (I) := 'c';\n when 'E' => Result (I) := 'g';\n when 'I' => Result (I) := 'k';\n when 'O' => Result (I) := 'q';\n when 'U' => Result (I) := 'w';\n when others => null;\n end case;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x4095df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033a5 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7facd1792248\n0x7facd1792303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_94_skjkasdkd", "outcome": "pass", "completion": " is\n function Is_Prime (N : Positive) return Boolean is\n I : Positive := 2;\n begin\n if N <= 1 then\n return False;\n end if;\n while I * I <= N loop\n if N mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;\n end Is_Prime;\n\n Best : Natural := 0;\n begin\n for V of Lst loop\n if V > Best and then Is_Prime (V) then\n Best := V;\n end if;\n end loop;\n if Best = 0 then\n return 0;\n end if;\n declare\n Sum : Natural := 0;\n Tmp : Natural := Best;\n begin\n while Tmp > 0 loop\n Sum := Sum + Tmp mod 10;\n Tmp := Tmp / 10;\n end loop;\n return Sum;\n end;", "log": ""} +{"name": "HumanEval_95_check_dict_case", "outcome": "compile_error", "completion": " is\n Lower_Count : Natural := 0;\n Upper_Count : Natural := 0;\n Total : Natural := 0;\n begin\n for C in Dict.Iterate loop\n declare\n Key : constant String := Key (C);\n begin\n Total := Total + 1;\n if Key = Key'Lower then\n Lower_Count := Lower_Count + 1;\n elsif Key = Key'Upper then\n Upper_Count := Upper_Count + 1;\n end if;\n end;\n end loop;\n return (Total > 0 and then Lower_Count = Total)\n or else (Total > 0 and then Upper_Count = Total);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:39:26: error: unrecognized attribute \"Lower\"\nprogram.ada:41:29: error: unrecognized attribute \"Upper\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_96_count_up_to", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. N);\n Count : Natural := 0;\n begin\n for I in 2 .. N loop\n declare\n Is_Prime : Boolean := True;\n begin\n for J in 2 .. I - 1 loop\n if I mod J = 0 then\n Is_Prime := False;\n exit;\n end if;\n end loop;\n if Is_Prime then\n Count := Count + 1;\n Result (Count) := I;\n end if;\n end;\n end loop;\n return Result (1 .. Count);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40999f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403225 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f54864f3248\n0x7f54864f3303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_97_multiply", "outcome": "pass", "completion": " is\n AD : constant Natural := abs (A mod 10);\n BD : constant Natural := abs (B mod 10);\n begin\n return AD * BD;", "log": ""} +{"name": "HumanEval_98_count_upper", "outcome": "runtime_error", "completion": " is\n Result : Integer := 0;\n begin\n for I in S'Range loop\n if I mod 2 = 0 then\n case S (I) is\n when 'A' | 'E' | 'I' | 'O' | 'U' =>\n Result := Result + 1;\n when others => null;\n end case;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408f5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40303e Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fc1529df248\n0x7fc1529df303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_99_closest_integer", "outcome": "runtime_error", "completion": " is\n V : constant Float := Float'Value (Value);\n begin\n if V > 0.0 then\n return Integer (V + 0.5);\n else\n return Integer (V - 0.5);\n end if;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408f9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403169 Main at main.adb:11\n0x402f2b Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f17e4426248\n0x7f17e4426303\n[./main]\n0x402a6f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_100_make_a_pile", "outcome": "pass", "completion": " is\n Result : Integer_Array (1 .. N);\n Current : Integer := N;\n begin\n for I in 1 .. N loop\n Result (I) := Current;\n if N mod 2 = 0 then\n Current := Current + 2;\n else\n Current := Current + 2;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_101_words_string", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. 50);\n Count : Natural := 0;\n Start : Positive := S'First;\n In_Word : Boolean := False;\n begin\n for I in S'Range loop\n if S (I) = ' ' or S (I) = ',' then\n if In_Word then\n Count := Count + 1;\n Result (Count) := To_Unbounded_String (S (Start .. I - 1));\n In_Word := False;\n end if;\n else\n if not In_Word then\n Start := I;\n In_Word := True;\n end if;\n end if;\n end loop;\n if In_Word then\n Count := Count + 1;\n Result (Count) := To_Unbounded_String (S (Start .. S'Last));\n end if;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_102_choose_num", "outcome": "pass", "completion": " is\n begin\n if X > Y then\n return -1;\n end if;\n for I in reverse X .. Y loop\n if I mod 2 = 0 then\n return I;\n end if;\n end loop;\n return -1;", "log": ""} +{"name": "HumanEval_104_unique_digits", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. X'Length);\n Count : Natural := 0;\n begin\n for V of X loop\n declare\n Tmp : Positive := V;\n Has_Ev : Boolean := False;\n begin\n while Tmp > 0 and then not Has_Ev loop\n if (Tmp mod 10) mod 2 = 0 then\n Has_Ev := True;\n end if;\n Tmp := Tmp / 10;\n end loop;\n if not Has_Ev then\n Count := Count + 1;\n Result (Count) := V;\n end if;\n end;\n end loop;\n -- Simple bubble sort\n for I in 1 .. Count - 1 loop\n for J in I + 1 .. Count loop\n if Result (J) < Result (I) then\n declare\n Temp : constant Integer := Result (I);\n begin\n Result (I) := Result (J);\n Result (J) := Temp;\n end;\n end if;\n end loop;\n end loop;\n return Result (1 .. Count);", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:18:27 range check failed\nvalue 0 not in 1..2147483647\n[./main]\n0x403138 Placeholder.Unique_Digits at placeholder.adb:18\n0x403505 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f2454280248\n0x7f2454280303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_105_by_length", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String_Array (Arr'Range);\n Count : Natural := 0;\n begin\n for I in Arr'Range loop\n if Arr (I) >= 1 and Arr (I) <= 9 then\n declare\n Name : constant String :=\n (case Arr (I) is\n when 1 => \"One\",\n when 2 => \"Two\",\n when 3 => \"Three\",\n when 4 => \"Four\",\n when 5 => \"Five\",\n when 6 => \"Six\",\n when 7 => \"Seven\",\n when 8 => \"Eight\",\n when 9 => \"Nine\");\n begin\n Result (Count + Arr'First) := To_Unbounded_String (Name);\n Count := Count + 1;\n end;\n end if;\n end loop;\n return Result (Result'First .. Result'First + Count - 1);", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:14:19: error: missing case values: -16#8000_0000# .. 0\nplaceholder.adb:14:19: error: missing case values: 10 .. 16#7FFF_FFFF#\nplaceholder.adb:14:24: error: subtype of expression is not static, alternatives must cover base type\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_106_f", "outcome": "pass", "completion": " is\n Result : Integer_Array (1 .. N);\n Sum : Natural := 0;\n Fact : Positive := 1;\n begin\n for I in 1 .. N loop\n if I mod 2 = 0 then\n Fact := 1;\n for J in 1 .. I loop\n Fact := Fact * J;\n end loop;\n Result (I) := Fact;\n else\n Sum := 0;\n for J in 1 .. I loop\n Sum := Sum + J;\n end loop;\n Result (I) := Sum;\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_107_even_odd_palindrome", "outcome": "compile_error", "completion": " is\n Result : Integer_Integer_Tuple := (Integer_1 => 0, Integer_2 => 0);\n begin\n for I in 1 .. N loop\n declare\n S : constant String := Integer'Image (I);\n Reversed : constant String := Reverse (S);\n begin\n if S = Reversed then\n if I mod 2 = 0 then\n Result.Integer_1 := Result.Integer_1 + 1;\n else\n Result.Integer_2 := Result.Integer_2 + 1;\n end if;\n end if;\n end;\n end loop;\n return Result;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:37:43: error: reserved word \"reverse\" cannot be used as identifier\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_108_count_nums", "outcome": "runtime_error", "completion": " is\n Result : Natural := 0;\n begin\n for N of Arr loop\n if N /= 0 then\n Result := Result + 1;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x408fdf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40307d Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f775cc4e248\n0x7f775cc4e303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_109_move_one_ball", "outcome": "runtime_error", "completion": " is\n Count : Natural := 0;\n Prev : Integer := Arr (Arr'Last);\n begin\n for I in Arr'First .. Arr'Last - 1 loop\n if Arr (I) < Prev then\n Count := Count + 1;\n end if;\n Prev := Arr (I);\n end loop;\n if Arr (Arr'First) < Arr (Arr'Last) then\n Count := Count + 1;\n end if;\n return Count <= 1;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:7:26 index check failed\nindex 0 not in 1..2147483647\n[./main]\n0x402fa1 Placeholder.Move_One_Ball at placeholder.adb:7\n0x403295 Main at main.adb:15\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fb670d36248\n0x7fb670d36303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_110_exchange", "outcome": "runtime_error", "completion": " is\n Has_Even : Boolean := False;\n Has_Odd : Boolean := False;\n begin\n for I in Lst1'Range loop\n if Lst1 (I) mod 2 = 0 then\n Has_Even := True;\n else\n Has_Odd := True;\n end if;\n end loop;\n if not Has_Odd or else not Has_Even then\n return \"YES\";\n end if;\n for I in Lst2'Range loop\n if Lst2 (I) mod 2 = 0 then\n return \"YES\";\n end if;\n end loop;\n return \"NO\";", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x40975f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032db Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f2f16866248\n0x7f2f16866303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_111_histogram", "outcome": "runtime_error", "completion": " is\n Counts : String_Integer_Dict.Map;\n Max_Count : Natural := 0;\n Result : String_Integer_Dict.Map;\n begin\n for C of Test loop\n if C = ' ' then\n goto Continue;\n end if;\n declare\n Key : constant String := [C];\n Cur : constant Integer :=\n (if Counts.Contains (Key)\n then Counts.Element (Key)\n else 0);\n begin\n Counts.Insert (Key, Cur + 1);\n if Cur + 1 > Max_Count then\n Max_Count := Cur + 1;\n end if;\n end;\n <> null;\n end loop;\n for C in Counts.Iterate loop\n if Integer'Image (Element (C)) = Integer'Image (Max_Count) then\n Result.Insert (Key (C), Element (C));\n end if;\n end loop;\n return Result;", "log": "\nraised CONSTRAINT_ERROR : Placeholder.String_Integer_Dict.Insert: key already in map\n[./main]\n0x409ac4 Placeholder.String_Integer_Dict.Insert at a-ciorma.adb:875\n0x410867 Placeholder.Histogram at placeholder.adb:22\n0x4113db Main at main.adb:13\n0x40341d Main at b~main.adb:261\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f36fe73c248\n0x7f36fe73c303\n[./main]\n0x402e3f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_112_reverse_delete", "outcome": "compile_error", "completion": " is\n Result : Unbounded_String := Null_Unbounded_String;\n Is_Palindrome : Boolean := True;\n begin\n for Ch of S loop\n if not (C contains Character'Val (Ch)) then\n Append (Result, Ch);\n end if;\n end loop;\n declare\n Rev : constant String := Reverse (To_String (Result));\n begin\n for I in 1 .. Natural'Min (Length (Result), Rev'Length) / 2 loop\n if Element (Result, I) /= Rev (Rev'Last - I + 1) then\n Is_Palindrome := False;\n end if;\n end loop;\n end;\n return (Unbounded_String_1 => Result, Boolean_2 => Is_Palindrome);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:35:19: error: binary operator expected\nprogram.ada:40:35: error: reserved word \"reverse\" cannot be used as identifier\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_113_odd_count", "outcome": "runtime_error", "completion": " is\n Result : Unbounded_String_Array (Lst'Range);\n Count : Natural;\n begin\n for I in Lst'Range loop\n Count := 0;\n for C of To_String (Lst (I)) loop\n if Character'Pos (C) mod 2 = 1 then\n Count := Count + 1;\n end if;\n end loop;\n declare\n S : constant String :=\n \"the number of odd elements\" & Count'Image &\n \"n the str\" & Count'Image & \"ng\" & Count'Image &\n \" of the\" & Count'Image & \"nput.\";\n begin\n Result (I) := To_Unbounded_String (S);\n end;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x413e9f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4055fa Main at main.adb:12\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f2b455e1248\n0x7f2b455e1303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_114_minSubArraySum", "outcome": "compile_error", "completion": " is\n Current_Min : Integer := Nums (Nums'First);\n Global_Min : Integer := Nums (Nums'First);\n begin\n for I in Nums'First + 1 .. Nums'Last loop\n if Nums (I) < Current_Min + Nums (I) then\n Current_Min := Nums (I);\n else\n Current_Min := Current_Min + Nums (I);\n end if;\n if Current_Min < Global_Min then\n Global_Min := Current_Min;\n end if;\n end loop;\n return Global_Min;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:14:31: error: value not in range of type \"Standard.Integer\"\nmain.adb:14:31: error: static expression fails Constraint_Check\nmain.adb:14:53: error: value not in range of type \"Standard.Integer\"\nmain.adb:14:53: error: static expression fails Constraint_Check\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_115_max_fill", "outcome": "compile_error", "completion": " is\n Total : Natural := 0;\n begin\n for Well of Grid loop\n declare\n Water : Natural := 0;\n begin\n for Unit of Well loop\n Water := Water + Unit;\n end loop;\n begin\n Total := Total + (Water + Capacity - 1) / Capacity;\n end;\n end loop;\n return Total;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:50:06: error: missing \"end;\" for \"begin\" at line 43\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_116_sort_array", "outcome": "pass", "completion": " is\n Result : Integer_Array := Arr;\n Temp : Integer;\n begin\n for I in Result'First .. Result'Last - 1 loop\n for J in I + 1 .. Result'Last loop\n declare\n Bits_I : Natural := 0;\n Bits_J : Natural := 0;\n Val : Integer;\n begin\n Val := abs (Result (I));\n while Val > 0 loop\n Bits_I := Bits_I + (Val mod 2);\n Val := Val / 2;\n end loop;\n Val := abs (Result (J));\n while Val > 0 loop\n Bits_J := Bits_J + (Val mod 2);\n Val := Val / 2;\n end loop;\n if Bits_I > Bits_J or else\n (Bits_I = Bits_J and then Result (I) > Result (J))\n then\n Temp := Result (I);\n Result (I) := Result (J);\n Result (J) := Temp;\n end if;\n end;\n end loop;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_117_select_words", "outcome": "compile_error", "completion": " is\n Words : constant Unbounded_String_Array := [for C in S'Range => To_Unbounded_String (C)];\n Result : Unbounded_String_Array (1 .. Words'Length);\n Count : Natural := 0;\n Consonant : constant String := \"bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ\";\n begin\n for W of Words loop\n declare\n Cs : Natural := 0;\n begin\n for Ch of To_String (W) loop\n if Consonant indexOf (Ch) > 0 then\n Cs := Cs + 1;\n end if;\n end loop;\n if Cs = N then\n Count := Count + 1;\n Result (Count) := W;\n end if;\n end;\n end loop;\n return Result (1 .. Count);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:41:28: error: binary operator expected\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_118_get_closest_vowel", "outcome": "runtime_error", "completion": " is\n type Char_Array is array (Positive range <>) of Character;\n Vowels : constant Char_Array := ('a', 'e', 'i', 'o', 'u',\n 'A', 'E', 'I', 'O', 'U');\n Found : Boolean := False;\n Result : Character := ' ';\n begin\n for I in reverse Word'First + 1 .. Word'Last - 1 loop\n if not Found then\n for V of Vowels loop\n if Word (I) = V then\n Found := True;\n Result := V;\n exit;\n end if;\n end loop;\n else\n for V of Vowels loop\n if Word (I) /= V then\n return String'[Result];\n end if;\n end loop;\n Found := False;\n end if;\n end loop;\n return \"\";", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x409d5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032b6 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f5a48e4a248\n0x7f5a48e4a303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_119_match_parens", "outcome": "runtime_error", "completion": " is\n Open_Count : Natural := 0;\n begin\n for I in Lst'Range loop\n declare\n S : constant String := To_String (Lst (I));\n begin\n for C of S loop\n if C = '(' then\n Open_Count := Open_Count + 1;\n elsif C = ')' then\n if Open_Count > 0 then\n Open_Count := Open_Count - 1;\n else\n return \"No\";\n end if;\n end if;\n end loop;\n end;\n end loop;\n return (if Open_Count = 0 then \"Yes\" else \"No\");", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:15\n[./main]\n0x41505f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x404eb9 Main at main.adb:15\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fbd4ead7248\n0x7fbd4ead7303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_120_maximum", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. K);\n Temp : Integer_Array := Arr;\n Max_Val : Integer;\n Idx : Positive;\n begin\n if K = 0 then\n return [];\n end if;\n for I in 1 .. K loop\n Max_Val := Integer'First;\n Idx := 0;\n for J in Temp'Range loop\n if Temp (J) > Max_Val then\n Max_Val := Temp (J);\n Idx := J;\n end if;\n end loop;\n Result (I) := Max_Val;\n Temp (Idx) := Integer'First;\n end loop;\n return Result;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:16 range check failed\n[./main]\n0x403158 Placeholder.Maximum at placeholder.adb:16\n0x403240 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f7cbb456248\n0x7f7cbb456303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_121_solution", "outcome": "runtime_error", "completion": " is\n Sum : Integer := 0;\n begin\n for I in Lst'Range loop\n if I mod 2 = 0 and then Lst (I) mod 2 /= 0 then\n Sum := Sum + Lst (I);\n end if;\n end loop;\n return Sum;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408f5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403054 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fb06623f248\n0x7fb06623f303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_122_add_elements", "outcome": "runtime_error", "completion": " is\n Sum : Integer := 0;\n Count : Natural := 0;\n begin\n for I in Arr'Range loop\n if Count >= K then\n exit;\n end if;\n if abs Arr (I) < 100 then\n Sum := Sum + Arr (I);\n Count := Count + 1;\n end if;\n end loop;\n return Sum;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x408f1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403121 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f6efbf2a248\n0x7f6efbf2a303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_123_get_odd_collatz", "outcome": "pass", "completion": " is\n Max_Len : constant := 1000;\n Result : Integer_Array (1 .. Max_Len);\n Count : Natural := 0;\n Current : Integer := N;\n begin\n while Current /= 1 loop\n if Current mod 2 = 1 then\n Count := Count + 1;\n Result (Count) := Current;\n end if;\n if Current mod 2 = 0 then\n Current := Current / 2;\n else\n Current := Current * 3 + 1;\n end if;\n end loop;\n Count := Count + 1;\n Result (Count) := 1;\n -- Simple bubble sort to sort the result\n for I in 1 .. Count - 1 loop\n for J in I + 1 .. Count loop\n if Result (J) < Result (I) then\n declare\n Temp : constant Integer := Result (I);\n begin\n Result (I) := Result (J);\n Result (J) := Temp;\n end;\n end if;\n end loop;\n end loop;\n return Result (1 .. Count);", "log": ""} +{"name": "HumanEval_124_valid_date", "outcome": "pass", "completion": " is\n function Is_Digit (C : Character) return Boolean is\n (Character'Pos (C) in 48 .. 57);\n function Parse_Int (S : String) return Natural is\n Result : Natural := 0;\n begin\n for C of S loop\n Result := Result * 10 + (Character'Pos (C) - 48);\n end loop;\n return Result;\n end Parse_Int;\n begin\n if Date'Length /= 10 then\n return False;\n end if;\n if not Is_Digit (Date (Date'First)) or else\n not Is_Digit (Date (Date'First + 1)) or else\n not Is_Digit (Date (Date'First + 3)) or else\n not Is_Digit (Date (Date'First + 4)) or else\n not Is_Digit (Date (Date'First + 6)) or else\n not Is_Digit (Date (Date'First + 7))\n then\n return False;\n end if;\n declare\n Month : constant Natural := Parse_Int (Date (Date'First ..\n Date'First + 1));\n Day : constant Natural := Parse_Int (Date (Date'First + 3 ..\n Date'First + 4));\n Year : constant Natural := Parse_Int (Date (Date'First + 6 ..\n Date'First + 9));\n begin\n if Month = 0 or else Month > 12 then\n return False;\n end if;\n if Day = 0 or else Day > 31 then\n return False;\n end if;\n if Month = 2 and then Day > 29 then\n return False;\n end if;\n if Month in 4 | 6 | 9 | 11 and then Day > 30 then\n return False;\n end if;\n return True;\n end;", "log": ""} +{"name": "HumanEval_126_is_sorted", "outcome": "runtime_error", "completion": " is\n Prev : Integer := Lst (Lst'First);\n begin\n if Lst'Length <= 1 then\n return True;\n end if;\n for I in Lst'First + 1 .. Lst'Last loop\n if Lst (I) < Prev then\n return False;\n elsif Lst (I) = Prev then\n return False;\n end if;\n Prev := Lst (I);\n end loop;\n return True;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:6:25 index check failed\nindex 1 not in -2147483648..0\n[./main]\n0x402f9a Placeholder.Is_Sorted at placeholder.adb:6\n0x403362 Main at main.adb:17\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fab35554248\n0x7fab35554303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_127_intersection", "outcome": "runtime_error", "completion": " is\n Start_Max : constant Integer := Integer'Max (Interval1.Integer_1, Interval2.Integer_1);\n End_Min : constant Integer := Integer'Min (Interval1.Integer_2, Interval2.Integer_2);\n begin\n if Start_Max > End_Min then\n return \"NO\";\n end if;\n declare\n Length : constant Natural := End_Min - Start_Max + 1;\n begin\n if Length <= 1 then\n return \"NO\";\n end if;\n for I in 2 .. Length / 2 loop\n if Length mod I = 0 then\n return \"NO\";\n end if;\n end loop;\n return \"YES\";\n end;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x4098df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032e3 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f30fc5e5248\n0x7f30fc5e5303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_128_prod_signs", "outcome": "compile_error", "completion": " is\n Sum_Mags : Integer := 0;\n Product : Integer := 1;\n begin\n if Arr'Length = 0 then\n return (Valid => False);\n end if;\n for I in Arr'Range loop\n Sum_Mags := Sum_Mags + abs (Arr (I));\n if Arr (I) > 0 then\n Product := Product * 1;\n elsif Arr (I) < 0 then\n Product := Product * -1;\n else\n return (Valid => True, Value => 0);\n end if;\n end loop;\n return (Valid => True, Value => Sum_Mags * Product);", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:43:34: error: parentheses required for unary minus\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_129_minPath", "outcome": "runtime_error", "completion": " is\n N : constant Positive := Grid'Length;\n Best_Val : Integer := Integer'Last;\n Best_Path : Integer_Array (1 .. K);\n begin\n for I in 1 .. N loop\n for J in 1 .. N loop\n declare\n Path : Integer_Array (1 .. K);\n Cur : Integer := Grid (I)(J);\n begin\n Path (1) := Cur;\n for Step in 2 .. K loop\n declare\n Neighbors : Integer_Vector.Vector;\n begin\n if I > 1 then\n Neighbors.Append (Grid (I - 1)(J));\n end if;\n if I < N then\n Neighbors.Append (Grid (I + 1)(J));\n end if;\n if J > 1 then\n Neighbors.Append (Grid (I)(J - 1));\n end if;\n if J < N then\n Neighbors.Append (Grid (I)(J + 1));\n end if;\n Cur := Integer'First;\n for Neighbor of Neighbors loop\n if Neighbor < Cur then\n Cur := Neighbor;\n end if;\n end loop;\n end;\n Path (Step) := Cur;\n end loop;\n if Path (K) < Best_Val then\n Best_Val := Path (K);\n Best_Path := Path;\n end if;\n end;\n end loop;\n end loop;\n return Best_Path;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:13\n[./main]\n0x4202df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x412e0f Main at main.adb:13\n0x40341d Main at b~main.adb:261\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f15c2718248\n0x7f15c2718303\n[./main]\n0x402e3f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_130_tri", "outcome": "runtime_error", "completion": " is\n Result : Integer_Array (1 .. N + 1);\n begin\n for I in Result'Range loop\n if I = 1 then\n Result (I) := 3;\n elsif I mod 2 = 0 then\n Result (I) := 1 + I / 2;\n else\n Result (I) := Result (I - 1) + Result (I - 2) + Result (I + 1);\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x409adf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033d1 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f560d524248\n0x7f560d524303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_131_digits", "outcome": "compile_error", "completion": " is\n Product : Integer := 1;\n Has_Odd : Boolean := False;\n Remainder : Integer;\n Copy : Integer := N;\n begin\n while Copy > 0 loop\n Remainder := Copy mod 10;\n if Remainder mod 2 /= 0 then\n Product := Product * Remainder;\n Has_Odd := True;\n end if;\n Copy := Copy / 10;\n end loop;\n if not Has_Odd then\n return 0;\n else\n return Product;\n end if;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:4:13: error: reserved word \"digits\" cannot be used as identifier\nprogram.ada:39:04: error: \"end Digits;\" expected\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_132_is_nested", "outcome": "runtime_error", "completion": " is\n Depth : Natural := 0;\n Max_Depth : Natural := 0;\n begin\n for C of My_String loop\n if C = '[' then\n Depth := Depth + 1;\n if Depth > Max_Depth then\n Max_Depth := Depth;\n end if;\n elsif C = ']' then\n Depth := Depth - 1;\n end if;\n end loop;\n return Max_Depth > 1;", "log": "\nraised CONSTRAINT_ERROR : placeholder.adb:16:28 range check failed\nvalue -1 not in 0..2147483647\n[./main]\n0x403004 Placeholder.Is_Nested at placeholder.adb:16\n0x40308b Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f8ac8658248\n0x7f8ac8658303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_133_sum_squares", "outcome": "compile_error", "completion": " is\n Total : Natural := 0;\n begin\n for V of Lst loop\n declare\n Rounded : constant Integer :=\n Integer'Ceiling (abs (V));\n Square : constant Integer := Rounded * Rounded;\n begin\n Total := Total + Square;\n end;\n end loop;\n return Total;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:11:15: error: prefix of \"Ceiling\" attribute must be float type\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_134_check_if_last_char_is_a_letter", "outcome": "compile_error", "completion": " is\n Trimmed : constant String := [for C in Txt'Range => C] & (others => ' ');\n begin\n for I in reverse Trimmed'First .. Trimmed'Last - 1 loop\n if Trimmed (I) = ' ' then\n if Is_Letter (Trimmed (I + 1)) then\n return False;\n end if;\n end if;\n end loop;\n return Is_Letter (Trimmed (Trimmed'Last));", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:6:59: error: expected type \"Standard.Character\"\nplaceholder.adb:6:59: error: found type \"Standard.Integer\"\nplaceholder.adb:6:65: error: \"others\" choice not allowed here\nplaceholder.adb:6:65: error: qualify the aggregate with a constrained subtype to provide bounds for it\nplaceholder.adb:10:16: error: \"Is_Letter\" is undefined (more references follow)\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_135_can_arrange", "outcome": "runtime_error", "completion": " is\n begin\n for I in Arr'First .. Arr'Last - 1 loop\n if Arr (I + 1) < Arr (I) then\n return I + 1;\n end if;\n end loop;\n return -1;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x408f1f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4030dd Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f934a37d248\n0x7f934a37d303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_136_largest_smallest_integers", "outcome": "pass", "completion": " is\n Neg_Max : Integer_Option;\n Pos_Min : Integer_Option;\n begin\n for V of Lst loop\n if V < 0 then\n if not Neg_Max.Valid or else V > Neg_Max.Value then\n Neg_Max := (Valid => True, Value => V);\n end if;\n elsif V > 0 then\n if not Pos_Min.Valid or else V < Pos_Min.Value then\n Pos_Min := (Valid => True, Value => V);\n end if;\n end if;\n end loop;\n return (Neg_Max, Pos_Min);", "log": ""} +{"name": "HumanEval_138_is_equal_to_sum_even", "outcome": "runtime_error", "completion": " is\n Remaining : Natural := N;\n begin\n if Remaining < 8 then\n return False;\n end if;\n while Remaining >= 8 loop\n Remaining := Remaining - 8;\n end loop;\n return Remaining = 0;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:14\n[./main]\n0x408e5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403090 Main at main.adb:14\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fdc28cd1248\n0x7fdc28cd1303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_139_special_factorial", "outcome": "compile_error", "completion": " is\n Result : Integer := 1;\n F : Integer := 1;\n begin\n for I in 1 .. N loop\n F := F * I;\n Result := Result * F;\n end loop;\n return Result;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\nmain.adb:13:35: error: value not in range of type \"Standard.Integer\"\nmain.adb:13:35: error: static expression fails Constraint_Check\ngnatmake: \"main.adb\" compilation error"} +{"name": "HumanEval_140_fix_spaces", "outcome": "runtime_error", "completion": " is\n Result : String := Text;\n Count : Natural := 0;\n begin\n for I in Result'Range loop\n if Result (I) = ' ' then\n Count := Count + 1;\n if Count > 2 then\n Result (I) := '-';\n end if;\n else\n Count := 0;\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x40945f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4032f2 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f097e843248\n0x7f097e843303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_141_file_name_check", "outcome": "runtime_error", "completion": " is\n Dots : Natural := 0;\n Has_Dot : Boolean := False;\n Num_Digs : Natural := 0;\n Ext_Start : Positive := File_Name'Last + 1;\n begin\n for I in File_Name'Range loop\n if File_Name (I) = '.' then\n Dots := Dots + 1;\n Has_Dot := True;\n Ext_Start := I + 1;\n elsif File_Name (I) in '0' .. '9' then\n Num_Digs := Num_Digs + 1;\n end if;\n end loop;\n if Dots /= 1 or else not Has_Dot then\n return \"No\";\n end if;\n if File_Name'Length - Ext_Start > 4\n or else File_Name'Length - Ext_Start < 3\n then\n return \"No\";\n end if;\n declare\n Ext : constant String :=\n File_Name (Ext_Start .. Ext_Start + 2);\n begin\n if Ext /= \"txt\" and then Ext /= \"exe\" and then Ext /= \"dll\" then\n return \"No\";\n end if;\n end;\n if File_Name (File_Name'First) not in 'a' .. 'z'\n or else File_Name (File_Name'First) not in 'A' .. 'Z'\n then\n return \"No\";\n end if;\n if Num_Digs > 3 then\n return \"No\";\n end if;\n return \"Yes\";", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40b1df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4035f8 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f62eeada248\n0x7f62eeada303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_142_sum_squares", "outcome": "runtime_error", "completion": " is\n Total : Integer := 0;\n begin\n for I in Lst'Range loop\n declare\n V : constant Integer := Lst (I);\n begin\n if I mod 3 = 0 then\n Total := Total + V * V;\n elsif I mod 4 = 0 then\n Total := Total + V * V * V;\n else\n Total := Total + V;\n end if;\n end;\n end loop;\n return Total;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40925f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40315a Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f8e4bc81248\n0x7f8e4bc81303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_143_words_in_sentence", "outcome": "runtime_error", "completion": " is\n Result : String (1 .. Sentence'Length);\n Len : Natural := 0;\n Start : Positive := Sentence'First;\n begin\n for I in Sentence'Range loop\n if Sentence (I) = ' ' then\n declare\n Word : constant String :=\n Sentence (Start .. I - 1);\n begin\n if Word'Length > 1 and then Word'Length < 4 then\n Len := Len + Word'Length;\n Result (Len .. Len + Word'Length - 1) := Word;\n end if;\n end;\n Start := I + 1;\n end if;\n end loop;\n if Start <= Sentence'Last then\n declare\n Word : constant String :=\n Sentence (Start .. Sentence'Last);\n begin\n if Word'Length > 1 and then Word'Length < 4 then\n Len := Len + Word'Length;\n Result (Len .. Len + Word'Length - 1) := Word;\n end if;\n end;\n end if;\n return Result (1 .. Len);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x409bdf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x40373f Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fdd8efe2248\n0x7fdd8efe2303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_144_simplify", "outcome": "compile_error", "completion": " is\n procedure Parse (S : String; Num, Den : out Positive) is\n Slash : constant Natural := Index (S, \"/\");\n begin\n Num := Positive'Value (S (S'First .. Slash - 1));\n Den := Positive'Value (S (Slash + 1 .. S'Last));\n end Parse;\n XN, XD : Positive;\n begin\n Parse (X, XN, XD);\n Parse (N, XD, XN); -- swap so we get x*n = xn/xd\n return XD mod XN = 0;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:7:38: error: \"Index\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_145_order_by_points", "outcome": "runtime_error", "completion": " is\n type Pair is record\n Value : Integer;\n Position : Positive;\n end record;\n type Pair_Array is array (Positive range <>) of Pair;\n Pairs : Pair_Array (1 .. Nums'Length);\n Result : Integer_Array (Nums'Range);\n Temp : Integer_Array (Nums'Range);\n begin\n for I in Pairs'Range loop\n Pairs (I) := (Value => Nums (Nums'First + I - 1),\n Position => Nums'First + I - 1);\n end loop;\n for I in Pairs'First .. Pairs'Last - 1 loop\n for J in I + 1 .. Pairs'Last loop\n declare\n Sum_A : Natural := 0;\n Sum_B : Natural := 0;\n Abs_A : Natural := abs Pairs (I).Value;\n Abs_B : Natural := abs Pairs (J).Value;\n begin\n while Abs_A > 0 loop\n Sum_A := Sum_A + Abs_A mod 10;\n Abs_A := Abs_A / 10;\n end loop;\n while Abs_B > 0 loop\n Sum_B := Sum_B + Abs_B mod 10;\n Abs_B := Abs_B / 10;\n end loop;\n if Sum_A > Sum_B or else\n (Sum_A = Sum_B and then Pairs (I).Position > Pairs (J).Position)\n then\n declare\n Tmp : constant Pair := Pairs (I);\n begin\n Pairs (I) := Pairs (J);\n Pairs (J) := Tmp;\n end;\n end if;\n end;\n end loop;\n end loop;\n for I in Pairs'Range loop\n Result (Result'First + I - 1) := Pairs (I).Value;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x409ddf System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403a6a Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f493d5ad248\n0x7f493d5ad303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_146_specialFilter", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for N of Nums loop\n if N > 10 then\n declare\n Abs_N : constant Natural := abs (N);\n Last_Dig : constant Natural := Abs_N mod 10;\n First_Dig : Natural := Abs_N;\n begin\n while First_Dig >= 10 loop\n First_Dig := First_Dig / 10;\n end loop;\n if First_Dig mod 2 = 1 and Last_Dig mod 2 = 1 then\n Count := Count + 1;\n end if;\n end;\n end if;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_147_get_max_triples", "outcome": "pass", "completion": " is\n Count : Natural := 0;\n begin\n for I in 1 .. N - 2 loop\n declare\n A_I : constant Integer := I * I - I + 1;\n begin\n for J in I + 1 .. N - 1 loop\n declare\n A_J : constant Integer := J * J - J + 1;\n begin\n for K in J + 1 .. N loop\n declare\n A_K : constant Integer := K * K - K + 1;\n Sum : constant Integer := A_I + A_J + A_K;\n begin\n if Sum mod 3 = 0 then\n Count := Count + 1;\n end if;\n end;\n end loop;\n end;\n end loop;\n end;\n end loop;\n return Count;", "log": ""} +{"name": "HumanEval_148_bf", "outcome": "compile_error", "completion": " is\n Planets : constant array (1 .. 8) of Unbounded_String :=\n [To_Unbounded_String (\"Mercury\"),\n To_Unbounded_String (\"Venus\"),\n To_Unbounded_String (\"Earth\"),\n To_Unbounded_String (\"Mars\"),\n To_Unbounded_String (\"Jupiter\"),\n To_Unbounded_String (\"Saturn\"),\n To_Unbounded_String (\"Uranus\"),\n To_Unbounded_String (\"Neptune\")];\n Idx1, Idx2 : Natural := 0;\n begin\n for I in Planets'Range loop\n if To_String (Planets (I)) = Planet1 then\n Idx1 := I;\n end if;\n if To_String (Planets (I)) = Planet2 then\n Idx2 := I;\n end if;\n end loop;\n if Idx1 = 0 or else Idx2 = 0 then\n return [];\n end if;\n declare\n Result : Unbounded_String_Array (1 .. abs (Idx1 - Idx2) - 1);\n Lo : constant Positive := Integer'Min (Idx1, Idx2) + 1;\n Hi : constant Positive := Integer'Max (Idx1, Idx2);\n begin\n for J in Lo .. Hi - 1 loop\n Result (J - Lo + 1) := Planets (J);\n end loop;\n return Result;\n end;", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:81:51: error: missing operand\nprogram.ada:82:50: error: missing operand\nprogram.ada:83:56: error: missing operand\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_149_sorted_list_sum", "outcome": "pass", "completion": " is\n Result : Unbounded_String_Array (1 .. Lst'Length);\n Temp : String (1 .. 500);\n Len : Natural := 0;\n begin\n for I in Lst'Range loop\n declare\n S : constant String := To_String (Lst (I));\n begin\n if S'Length mod 2 = 0 then\n Len := Len + 1;\n Result (Len) := Lst (I);\n end if;\n end;\n end loop;\n for I in 1 .. Len - 1 loop\n for J in I + 1 .. Len loop\n if Length (Result (J)) < Length (Result (I)) then\n declare\n Tmp : constant Unbounded_String := Result (I);\n begin\n Result (I) := Result (J);\n Result (J) := Tmp;\n end;\n elsif Length (Result (J)) = Length (Result (I))\n and then To_String (Result (J)) < To_String (Result (I))\n then\n declare\n Tmp : constant Unbounded_String := Result (I);\n begin\n Result (I) := Result (J);\n Result (J) := Tmp;\n end;\n end if;\n end loop;\n end loop;\n return Result (1 .. Len);", "log": ""} +{"name": "HumanEval_150_x_or_y", "outcome": "pass", "completion": " is\n function Is_Prime (Num : Positive) return Boolean is\n I : Positive := 2;\n begin\n if Num = 1 then\n return False;\n end if;\n while I <= Num / 2 loop\n if Num mod I = 0 then\n return False;\n end if;\n I := I + 1;\n end loop;\n return True;\n end Is_Prime;\n begin\n if N > 1 and then Is_Prime (N) then\n return X;\n else\n return Y;\n end if;", "log": ""} +{"name": "HumanEval_151_double_the_difference", "outcome": "pass", "completion": " is\n Sum : Integer := 0;\n begin\n for V of Lst loop\n if V >= 0.0 and then V = Float'Floor (V) then\n declare\n I : constant Integer := Integer (V);\n begin\n if I mod 2 /= 0 then\n Sum := Sum + I * I;\n end if;\n end;\n end if;\n end loop;\n return Sum;", "log": ""} +{"name": "HumanEval_152_compare", "outcome": "pass", "completion": " is\n Result : Integer_Array (Guess'Range);\n begin\n for I in Guess'Range loop\n if Game (I) = Guess (I) then\n Result (I) := 0;\n else\n Result (I) := abs (Game (I) - Guess (I));\n end if;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_153_Strongest_Extension", "outcome": "compile_error", "completion": " is\n Best_Idx : Positive := Extensions'First;\n Best_Score : Integer := Integer'Minimum (Integer'Last, Integer'First);\n Score : Integer;\n begin\n for I in Extensions'Range loop\n declare\n S : constant String := To_String (Extensions (I));\n Uc : Natural := 0;\n Lc : Natural := 0;\n begin\n for C of S loop\n if C in 'A' .. 'Z' then\n Uc := Uc + 1;\n elsif C in 'a' .. 'z' then\n Lc := Lc + 1;\n end if;\n end loop;\n Score := Uc - Lc;\n if Score > Best_Score then\n Best_Score := Score;\n Best_Idx := I;\n end if;\n end;\n end loop;\n return Class_Name & \".\" & To_String (Extensions (Best_Idx));", "log": "splitting program.ada into:\n placeholder.ads\n placeholder.adb\n main.adb\nprogram.ada:32:39: error: unrecognized attribute \"Minimum\"\nprogram.ada: parse errors detected\nprogram.ada: chop may not be successful"} +{"name": "HumanEval_154_cycpattern_check", "outcome": "runtime_error", "completion": " is\n Combined : constant String := B & B;\n begin\n for I in Combined'First .. Combined'Last - A'Length + 1 loop\n if Combined (I .. I + A'Length - 1) = A then\n return True;\n end if;\n end loop;\n return False;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x4092df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x4033e7 Main at main.adb:12\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f11618e0248\n0x7f11618e0303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_155_even_odd_count", "outcome": "pass", "completion": " is\n Result : Integer_Integer_Tuple := (Integer_1 => 0, Integer_2 => 0);\n Abs_Num : Natural := abs Num;\n begin\n if Abs_Num = 0 then\n Result.Integer_1 := 1;\n return Result;\n end if;\n while Abs_Num > 0 loop\n if Abs_Num mod 10 mod 2 = 0 then\n Result.Integer_1 := Result.Integer_1 + 1;\n else\n Result.Integer_2 := Result.Integer_2 + 1;\n end if;\n Abs_Num := Abs_Num / 10;\n end loop;\n return Result;", "log": ""} +{"name": "HumanEval_156_int_to_mini_roman", "outcome": "runtime_error", "completion": " is\n type Pair is record\n Value : Positive;\n Name : Character;\n end record;\n Table : constant array (1 .. 7) of Pair :=\n [(1000, 'm'), (900, 'c'), (500, 'd'), (400, 'c'),\n (100, 'c'), (90, 'x'), (50, 'l')];\n Result : String (1 .. 20);\n Pos : Natural := 0;\n N : Integer := Number;\n begin\n for P of Table loop\n while N >= P.Value loop\n Pos := Pos + 1;\n Result (Pos) := P.Name;\n N := N - P.Value;\n end loop;\n end loop;\n return Result (1 .. Pos);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x409c5f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403191 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f73cf623248\n0x7f73cf623303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_157_right_angle_triangle", "outcome": "runtime_error", "completion": " is\n Sides : constant array (1 .. 3) of Integer := [A, B, C];\n Hypotenuse_Sq : Integer := 0;\n begin\n for I in Sides'Range loop\n if Sides (I) > Hypotenuse_Sq then\n Hypotenuse_Sq := Sides (I);\n end if;\n end loop;\n declare\n Sum_Of_Others_Sq : Integer := 0;\n begin\n for I in Sides'Range loop\n if Sides (I) /= Hypotenuse_Sq then\n Sum_Of_Others_Sq := Sum_Of_Others_Sq + Sides (I) * Sides (I);\n end if;\n end loop;\n return Sum_Of_Others_Sq = Hypotenuse_Sq;\n end;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x40901f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403077 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f6e0c9fd248\n0x7f6e0c9fd303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_158_find_max", "outcome": "pass", "completion": " is\n Best : Unbounded_String := Null_Unbounded_String;\n Best_U : Natural := 0;\n begin\n for W of Words loop\n declare\n Seen : array (Character range 'a' .. 'z') of Boolean :=\n [others => False];\n Count : Natural := 0;\n begin\n for C of To_String (W) loop\n if not Seen (C) then\n Seen (C) := True;\n Count := Count + 1;\n end if;\n end loop;\n if Count > Best_U or else\n (Count = Best_U and then W < Best)\n then\n Best := W;\n Best_U := Count;\n end if;\n end;\n end loop;\n return To_String (Best);", "log": ""} +{"name": "HumanEval_159_eat", "outcome": "pass", "completion": " is\n Total_Eaten : constant Integer := Number + Integer'Min (Need, Remaining);\n Left : constant Integer := Remaining - Integer'Min (Need, Remaining);\n begin\n return [Total_Eaten, Left];", "log": ""} +{"name": "HumanEval_160_do_algebra", "outcome": "runtime_error", "completion": " is\n Result : Integer := Operand (Operand'First);\n begin\n for I in Operator'Range loop\n if Operator (I) = \"+\" then\n Result := Result + Operand (I + Operand'First);\n elsif Operator (I) = \"-\" then\n Result := Result - Operand (I + Operand'First);\n elsif Operator (I) = \"*\" then\n Result := Result * Operand (I + Operand'First);\n elsif Operator (I) = \"/\" then\n Result := Result / Operand (I + Operand'First);\n end if;\n end loop;\n return Result;", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:12\n[./main]\n0x41241f System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x404b80 Main at main.adb:12\n0x403863 Main at b~main.adb:253\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7f389696a248\n0x7f389696a303\n[./main]\n0x40329f _start at ???\n0xfffffffffffffffe"} +{"name": "HumanEval_161_solve", "outcome": "pass", "completion": " is\n Has_Letter : Boolean := False;\n Result : String := S;\n begin\n for I in Result'Range loop\n if Result (I) in 'a' .. 'z' | 'A' .. 'Z' then\n Has_Letter := True;\n if Result (I) in 'a' .. 'z' then\n Result (I) := Character'Val (Character'Pos (Result (I)) - 32);\n else\n Result (I) := Character'Val (Character'Pos (Result (I)) + 32);\n end if;\n end if;\n end loop;\n if not Has_Letter then\n for I in Result'First .. Result'Last / 2 loop\n declare\n Tmp : constant Character := Result (I);\n begin\n Result (I) := Result (Result'Last - I + Result'First);\n Result (Result'Last - I + Result'First) := Tmp;\n end;\n end loop;\n end if;\n return Result;", "log": ""} +{"name": "HumanEval_162_string_to_md5", "outcome": "compile_error", "completion": " is\n begin\n if Text = \"\" then\n return (Valid => False);\n else\n declare\n use GNAT.MD5;\n Hash : constant MD5_Hash := Digest (Text);\n begin\n return (Valid => True,\n Value => To_Unbounded_String\n (To_Hex_String (Hash)));\n end;\n end if;", "log": "gcc -c -gnatW8 -g -gnata -gnat2022 -gnateE main.adb\ngcc -c -gnatW8 -g -gnata -gnat2022 -gnateE placeholder.adb\nplaceholder.adb:12:17: error: \"GNAT\" is undefined\nplaceholder.adb:12:17: error: missing \"with GNAT.MD5;\"\nplaceholder.adb:13:29: error: \"MD5_Hash\" is undefined\nplaceholder.adb:13:41: error: \"Digest\" is undefined\nplaceholder.adb:17:24: error: \"To_Hex_String\" is undefined\ngnatmake: \"placeholder.adb\" compilation error"} +{"name": "HumanEval_163_generate_integers", "outcome": "runtime_error", "completion": " is\n Lo : constant Positive := Positive'Min (A, B);\n Hi : constant Positive := Positive'Max (A, B);\n Result : Integer_Array (1 .. 5); -- max 5 even digits\n Count : Natural := 0;\n begin\n for I in Lo .. Hi loop\n if I mod 2 = 0 then\n Count := Count + 1;\n Result (Count) := I;\n end if;\n end loop;\n return Result (1 .. Count);", "log": "\nraised ADA.ASSERTIONS.ASSERTION_ERROR : main.adb:11\n[./main]\n0x4093df System.Assertions.Raise_Assert_Failure at s-assert.adb:44\n0x403268 Main at main.adb:11\n0x402eeb Main at b~main.adb:199\n[/lib/x86_64-linux-gnu/libc.so.6]\n0x7fc4b35f4248\n0x7fc4b35f4303\n[./main]\n0x402a2f _start at ???\n0xfffffffffffffffe"} diff --git a/results/train.json b/results/train.json new file mode 100644 index 0000000..de8cdbb --- /dev/null +++ b/results/train.json @@ -0,0 +1,14 @@ +{ + "base": "Qwen/Qwen2.5-Coder-7B-Instruct", + "rows": 6110, + "steps": 378, + "epochs": 1.0, + "loss": 0.2128, + "runtime_s": 4135, + "learning_rate": 0.0002, + "batch_size": 16, + "max_length": 2048, + "lora_r": 16, + "lora_alpha": 32, + "device": "NVIDIA A10G" +} \ No newline at end of file diff --git a/tokenizer.json b/tokenizer.json new file mode 100644 index 0000000..34510ff --- /dev/null +++ b/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fd169731d2cbde95e10bf356d66d5997fd885dd8dbb6fb4684da3f23b2585d8 +size 11421892 diff --git a/tokenizer_config.json b/tokenizer_config.json new file mode 100644 index 0000000..5156d16 --- /dev/null +++ b/tokenizer_config.json @@ -0,0 +1,30 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": false, + "local_files_only": false, + "model_max_length": 32768, + "pad_token": "<|endoftext|>", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +}