Datasets:

Modalities:
Text
Formats:
parquet
Languages:
English
ArXiv:
DOI:
Libraries:
Datasets
pandas
License:
Dataset Viewer
Auto-converted to Parquet Duplicate
name
stringlengths
15
44
language
stringclasses
1 value
prompt
stringlengths
311
1.97k
doctests
stringclasses
1 value
original
stringlengths
108
137
prompt_terminology
stringclasses
1 value
tests
stringlengths
300
2.15k
stop_tokens
listlengths
1
1
HumanEval_0_has_close_elements
adb
pragma Ada_2022; package Placeholder is type Float_Array is array (Positive range <>) of Float; function Has_Close_Elements (Numbers : Float_Array; Threshold : Float) return Boolean; -- Check if in given Vector of numbers, are any two numbers closer to each other than -- given threshold. -- >>> Has_Clos...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_0_has_close_elements.py
reworded
end Has_Close_Elements; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Numbers : Float_Array; Threshold : Float) return Boolean renames Placeholder.Has_Close_Elements; begin pragma Assert (Candidate ([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3) = True)...
[ "\n end " ]
HumanEval_1_separate_paren_groups
adb
pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Placeholder is type Unbounded_String_Array is array (Positive range <>) of Unbounded_String; function Separate_Paren_Groups (Paren_String : String) return Unbounded_String_Array; -- Input to this function is a string containing mu...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_1_separate_paren_groups.py
reworded
end Separate_Paren_Groups; end Placeholder; pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Placeholder; use Placeholder; procedure Main is function Candidate (Paren_String : String) return Unbounded_String_Array renames Placeholder.Separate_Paren_Groups; begin pragma Assert...
[ "\n end " ]
HumanEval_2_truncate_number
adb
pragma Ada_2022; package Placeholder is function Truncate_Number (Number : Float) return Float; -- Given a positive floating point number, it can be decomposed into -- and integer part (largest integer smaller than given number) and decimals -- (leftover part always smaller than 1). -- Return the decima...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_2_truncate_number.py
reworded
end Truncate_Number; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Number : Float) return Float renames Placeholder.Truncate_Number; begin pragma Assert (Candidate (3.5) = 0.5); pragma Assert (Candidate (1.25) = 0.25); pragma Assert (Can...
[ "\n end " ]
HumanEval_3_below_zero
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Below_Zero (Operations : Integer_Array) return Boolean; -- You're given a Vector of deposit and withdrawal operations on a bank account that starts with -- zero balance. Your task is to detect if at...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_3_below_zero.py
reworded
end Below_Zero; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Operations : Integer_Array) return Boolean renames Placeholder.Below_Zero; begin pragma Assert (Candidate ([]) = False); pragma Assert (Candidate ([1, 2, -3, 1, 2, -3]) = False);...
[ "\n end " ]
HumanEval_4_mean_absolute_deviation
adb
pragma Ada_2022; package Placeholder is type Float_Array is array (Positive range <>) of Float; function Mean_Absolute_Deviation (Numbers : Float_Array) return Float; -- For a given Vector of input numbers, calculate Mean Absolute Deviation -- around the mean of this dataset. -- Mean Absolute Deviation ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_4_mean_absolute_deviation.py
reworded
end Mean_Absolute_Deviation; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Numbers : Float_Array) return Float renames Placeholder.Mean_Absolute_Deviation; begin pragma Assert (Candidate ([1.0, 2.0]) = 0.5); pragma Assert (Candidate ([1.0, ...
[ "\n end " ]
HumanEval_5_intersperse
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Intersperse (Numbers : Integer_Array; Delimeter : Integer) return Integer_Array; -- Insert a number 'delimeter' between every two consecutive elements of input Vector `numbers' -- >>> Intersperse ([...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_5_intersperse.py
reworded
end Intersperse; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Numbers : Integer_Array; Delimeter : Integer) return Integer_Array renames Placeholder.Intersperse; begin pragma Assert (Candidate ([], 7) = []); pragma Assert (Candidate ([5, 6...
[ "\n end " ]
HumanEval_6_parse_nested_parens
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Parse_Nested_Parens (Paren_String : String) return Integer_Array; -- Input to this function is a string represented multiple groups for nested parentheses separated by spaces. -- For each of the gro...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_6_parse_nested_parens.py
reworded
end Parse_Nested_Parens; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Paren_String : String) return Integer_Array renames Placeholder.Parse_Nested_Parens; begin pragma Assert (Candidate ("(()()) ((())) () ((())()())") = [2, 3, 1, 3]); prag...
[ "\n end " ]
HumanEval_7_filter_by_substring
adb
pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Placeholder is type Unbounded_String_Array is array (Positive range <>) of Unbounded_String; function Filter_By_Substring (Strings : Unbounded_String_Array; Substring : String) return Unbounded_String_Array; -- Filter an input Vec...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_7_filter_by_substring.py
reworded
end Filter_By_Substring; end Placeholder; pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Placeholder; use Placeholder; procedure Main is function Candidate (Strings : Unbounded_String_Array; Substring : String) return Unbounded_String_Array renames Placeholder.Filter_By_Substri...
[ "\n end " ]
HumanEval_8_sum_product
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; type Integer_Integer_Tuple is record Integer_1 : Integer; Integer_2 : Integer; end record; function Sum_Product (Numbers : Integer_Array) return Integer_Integer_Tuple; -- For a given Vector o...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_8_sum_product.py
reworded
end Sum_Product; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Numbers : Integer_Array) return Integer_Integer_Tuple renames Placeholder.Sum_Product; begin pragma Assert (Candidate ([]) = (0, 1)); pragma Assert (Candidate ([1, 1, 1]) = (3, ...
[ "\n end " ]
HumanEval_9_rolling_max
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Rolling_Max (Numbers : Integer_Array) return Integer_Array; -- From a given Vector of integers, generate a Vector of rolling maximum element found until given moment -- in the sequence. -- >>> Ro...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_9_rolling_max.py
reworded
end Rolling_Max; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Numbers : Integer_Array) return Integer_Array renames Placeholder.Rolling_Max; begin pragma Assert (Candidate ([]) = []); pragma Assert (Candidate ([1, 2, 3, 4]) = [1, 2, 3, 4])...
[ "\n end " ]
HumanEval_10_make_palindrome
adb
pragma Ada_2022; package Placeholder is function Make_Palindrome (My_String : String) return String; -- Find the shortest palindrome that begins with a supplied string. -- Algorithm idea is simple: -- - Find the longest postfix of supplied string that is a palindrome. -- - Append to the end of the strin...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_10_make_palindrome.py
reworded
end Make_Palindrome; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (My_String : String) return String renames Placeholder.Make_Palindrome; begin pragma Assert (Candidate ("") = ""); pragma Assert (Candidate ("x") = "x"); pragma Assert (Ca...
[ "\n end " ]
HumanEval_11_string_xor
adb
pragma Ada_2022; package Placeholder is function String_Xor (A : String; B : String) return String; -- Input are two strings a and b consisting only of 1s and 0s. -- Perform binary XOR on these inputs and return result also as a string. -- >>> String_Xor ("010", "110") -- "100" end Placeholder; pragma...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_11_string_xor.py
reworded
end String_Xor; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (A : String; B : String) return String renames Placeholder.String_Xor; begin pragma Assert (Candidate ("111000", "101010") = "010010"); pragma Assert (Candidate ("1", "1") = "0");...
[ "\n end " ]
HumanEval_12_longest
adb
pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Placeholder is type Unbounded_String_Array is array (Positive range <>) of Unbounded_String; type Unbounded_String_Option (Valid : Boolean := False) is record case Valid is when True => Value : Unbounded_String; ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_12_longest.py
reworded
end Longest; end Placeholder; pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Placeholder; use Placeholder; procedure Main is function Candidate (Strings : Unbounded_String_Array) return Unbounded_String_Option renames Placeholder.Longest; begin pragma Assert (Candidate ([])...
[ "\n end " ]
HumanEval_13_greatest_common_divisor
adb
pragma Ada_2022; package Placeholder is function Greatest_Common_Divisor (A : Integer; B : Integer) return Integer; -- Return a greatest common divisor of two integers a and b -- >>> Greatest_Common_Divisor (3, 5) -- 1 -- >>> Greatest_Common_Divisor (25, 15) -- 5 end Placeholder; pragma Ada_2022; ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_13_greatest_common_divisor.py
reworded
end Greatest_Common_Divisor; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (A : Integer; B : Integer) return Integer renames Placeholder.Greatest_Common_Divisor; begin pragma Assert (Candidate (3, 7) = 1); pragma Assert (Candidate (10, 15) =...
[ "\n end " ]
HumanEval_14_all_prefixes
adb
pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Placeholder is type Unbounded_String_Array is array (Positive range <>) of Unbounded_String; function All_Prefixes (My_String : String) return Unbounded_String_Array; -- Return Vector of all prefixes from shortest to longest of th...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_14_all_prefixes.py
reworded
end All_Prefixes; end Placeholder; pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Placeholder; use Placeholder; procedure Main is function Candidate (My_String : String) return Unbounded_String_Array renames Placeholder.All_Prefixes; begin pragma Assert (Candidate ("") = []...
[ "\n end " ]
HumanEval_15_string_sequence
adb
pragma Ada_2022; package Placeholder is function String_Sequence (N : Integer) return String; -- Return a string containing space-delimited numbers starting from 0 upto n inclusive. -- >>> String_Sequence (0) -- "0" -- >>> String_Sequence (5) -- "0 1 2 3 4 5" end Placeholder; pragma Ada_2022; pack...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_15_string_sequence.py
reworded
end String_Sequence; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return String renames Placeholder.String_Sequence; begin pragma Assert (Candidate (0) = "0"); pragma Assert (Candidate (3) = "0 1 2 3"); pragma Assert (Candi...
[ "\n end " ]
HumanEval_16_count_distinct_characters
adb
pragma Ada_2022; package Placeholder is function Count_Distinct_Characters (My_String : String) return Integer; -- Given a string, find out how many distinct characters (regardless of case) does it consist of -- >>> Count_Distinct_Characters ("xyzXYZ") -- 3 -- >>> Count_Distinct_Characters ("Jerry") ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_16_count_distinct_characters.py
reworded
end Count_Distinct_Characters; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (My_String : String) return Integer renames Placeholder.Count_Distinct_Characters; begin pragma Assert (Candidate ("") = 0); pragma Assert (Candidate ("abcde") = 5)...
[ "\n end " ]
HumanEval_17_parse_music
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Parse_Music (Music_String : String) return Integer_Array; -- Input to this function is a string representing musical notes in a special ASCII format. -- Your task is to parse this string and return ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_17_parse_music.py
reworded
end Parse_Music; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Music_String : String) return Integer_Array renames Placeholder.Parse_Music; begin pragma Assert (Candidate ("") = []); pragma Assert (Candidate ("o o o o") = [4, 4, 4, 4]); ...
[ "\n end " ]
HumanEval_18_how_many_times
adb
pragma Ada_2022; package Placeholder is function How_Many_Times (My_String : String; Substring : String) return Integer; -- Find how many times a given substring can be found in the original string. Count overlaping cases. -- >>> How_Many_Times ("", "a") -- 0 -- >>> How_Many_Times ("aaa", "a") -- 3 ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_18_how_many_times.py
reworded
end How_Many_Times; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (My_String : String; Substring : String) return Integer renames Placeholder.How_Many_Times; begin pragma Assert (Candidate ("", "x") = 0); pragma Assert (Candidate ("xyxyxyx",...
[ "\n end " ]
HumanEval_19_sort_numbers
adb
pragma Ada_2022; package Placeholder is function Sort_Numbers (Numbers : String) return String; -- Input is a space-delimited string of numberals from 'zero' to 'nine'. -- Valid choices are 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight' and 'nine'. -- Return the string with numbers ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_19_sort_numbers.py
reworded
end Sort_Numbers; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Numbers : String) return String renames Placeholder.Sort_Numbers; begin pragma Assert (Candidate ("") = ""); pragma Assert (Candidate ("three") = "three"); pragma Assert (Ca...
[ "\n end " ]
HumanEval_20_find_closest_elements
adb
pragma Ada_2022; package Placeholder is type Float_Array is array (Positive range <>) of Float; type Float_Float_Tuple is record Float_1 : Float; Float_2 : Float; end record; function Find_Closest_Elements (Numbers : Float_Array) return Float_Float_Tuple; -- From a supplied Vector of number...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_20_find_closest_elements.py
reworded
end Find_Closest_Elements; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Numbers : Float_Array) return Float_Float_Tuple renames Placeholder.Find_Closest_Elements; begin pragma Assert (Candidate ([1.0, 2.0, 3.9, 4.0, 5.0, 2.2]) = (3.9, 4.0)); ...
[ "\n end " ]
HumanEval_21_rescale_to_unit
adb
pragma Ada_2022; package Placeholder is type Float_Array is array (Positive range <>) of Float; function Rescale_To_Unit (Numbers : Float_Array) return Float_Array; -- Given Vector of numbers (of at least two elements), apply a linear transform to that Vector, -- such that the smallest number will become 0...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_21_rescale_to_unit.py
reworded
end Rescale_To_Unit; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Numbers : Float_Array) return Float_Array renames Placeholder.Rescale_To_Unit; begin pragma Assert (Candidate ([2.0, 49.9]) = [0.0, 1.0]); pragma Assert (Candidate ([100.0, ...
[ "\n end " ]
HumanEval_23_strlen
adb
pragma Ada_2022; package Placeholder is function Strlen (My_String : String) return Integer; -- Return length of given string -- >>> Strlen ("") -- 0 -- >>> Strlen ("abc") -- 3 end Placeholder; pragma Ada_2022; package body Placeholder is function Strlen (My_String : String) return Integer
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_23_strlen.py
reworded
end Strlen; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (My_String : String) return Integer renames Placeholder.Strlen; begin pragma Assert (Candidate ("") = 0); pragma Assert (Candidate ("x") = 1); pragma Assert (Candidate ("asdasnakj"...
[ "\n end " ]
HumanEval_24_largest_divisor
adb
pragma Ada_2022; package Placeholder is function Largest_Divisor (N : Integer) return Integer; -- For a given number n, find the largest number that divides n evenly, smaller than n -- >>> Largest_Divisor (15) -- 5 end Placeholder; pragma Ada_2022; package body Placeholder is function Largest_Divisor...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_24_largest_divisor.py
reworded
end Largest_Divisor; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Integer renames Placeholder.Largest_Divisor; begin pragma Assert (Candidate (3) = 1); pragma Assert (Candidate (7) = 1); pragma Assert (Candidate (10)...
[ "\n end " ]
HumanEval_25_factorize
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Factorize (N : Integer) return Integer_Array; -- Return Vector of prime factors of given integer in the order from smallest to largest. -- Each of the factors should be Vectored number of times corr...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_25_factorize.py
reworded
end Factorize; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Integer_Array renames Placeholder.Factorize; begin pragma Assert (Candidate (2) = [2]); pragma Assert (Candidate (4) = [2, 2]); pragma Assert (Candidate (8)...
[ "\n end " ]
HumanEval_26_remove_duplicates
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Remove_Duplicates (Numbers : Integer_Array) return Integer_Array; -- From a Vector of integers, remove all elements that occur more than once. -- Keep order of elements left the same as in the input...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_26_remove_duplicates.py
reworded
end Remove_Duplicates; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Numbers : Integer_Array) return Integer_Array renames Placeholder.Remove_Duplicates; begin pragma Assert (Candidate ([]) = []); pragma Assert (Candidate ([1, 2, 3, 4]) = [...
[ "\n end " ]
HumanEval_27_flip_case
adb
pragma Ada_2022; package Placeholder is function Flip_Case (My_String : String) return String; -- For a given string, flip lowercase characters to uppercase and uppercase to lowercase. -- >>> Flip_Case ("Hello") -- "hELLO" end Placeholder; pragma Ada_2022; package body Placeholder is function Flip_Ca...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_27_flip_case.py
reworded
end Flip_Case; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (My_String : String) return String renames Placeholder.Flip_Case; begin pragma Assert (Candidate ("") = ""); pragma Assert (Candidate ("Hello!") = "hELLO!"); pragma Assert (Cand...
[ "\n end " ]
HumanEval_28_concatenate
adb
pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Placeholder is type Unbounded_String_Array is array (Positive range <>) of Unbounded_String; function Concatenate (Strings : Unbounded_String_Array) return String; -- Concatenate Vector of strings into a single string -- >>> Co...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_28_concatenate.py
reworded
end Concatenate; end Placeholder; pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Placeholder; use Placeholder; procedure Main is function Candidate (Strings : Unbounded_String_Array) return String renames Placeholder.Concatenate; begin pragma Assert (Candidate ([]) = ""); ...
[ "\n end " ]
HumanEval_29_filter_by_prefix
adb
pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Placeholder is type Unbounded_String_Array is array (Positive range <>) of Unbounded_String; function Filter_By_Prefix (Strings : Unbounded_String_Array; Prefix : String) return Unbounded_String_Array; -- Filter an input Vector of...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_29_filter_by_prefix.py
reworded
end Filter_By_Prefix; end Placeholder; pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Placeholder; use Placeholder; procedure Main is function Candidate (Strings : Unbounded_String_Array; Prefix : String) return Unbounded_String_Array renames Placeholder.Filter_By_Prefix; begi...
[ "\n end " ]
HumanEval_30_get_positive
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Get_Positive (L : Integer_Array) return Integer_Array; -- Return only positive numbers in the Vector. -- >>> Get_Positive ([-1, 2, -4, 5, 6]) -- [2, 5, 6] -- >>> Get_Positive ([5, 3, -5, 2, -3...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_30_get_positive.py
reworded
end Get_Positive; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (L : Integer_Array) return Integer_Array renames Placeholder.Get_Positive; begin pragma Assert (Candidate ([-1, -2, 4, 5, 6]) = [4, 5, 6]); pragma Assert (Candidate ([5, 3, -5, ...
[ "\n end " ]
HumanEval_31_is_prime
adb
pragma Ada_2022; package Placeholder is function Is_Prime (N : Integer) return Boolean; -- Return true if a given number is prime, and false otherwise. -- >>> Is_Prime (6) -- False -- >>> Is_Prime (101) -- True -- >>> Is_Prime (11) -- True -- >>> Is_Prime (13441) -- True -- >>> Is_Prim...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_31_is_prime.py
reworded
end Is_Prime; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Boolean renames Placeholder.Is_Prime; begin pragma Assert (Candidate (6) = False); pragma Assert (Candidate (101) = True); pragma Assert (Candidate (11) = Tr...
[ "\n end " ]
HumanEval_33_sort_third
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Sort_Third (L : Integer_Array) return Integer_Array; -- This function takes a Vector l and returns a Vector l' such that -- l' is identical to l in the indicies that are not divisible by three, whil...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_33_sort_third.py
reworded
end Sort_Third; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (L : Integer_Array) return Integer_Array renames Placeholder.Sort_Third; begin pragma Assert (Candidate ([5, 6, 3, 4, 8, 9, 2]) = [2, 6, 3, 4, 8, 9, 5]); pragma Assert (Candidate ...
[ "\n end " ]
HumanEval_34_unique
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Unique (L : Integer_Array) return Integer_Array; -- Return sorted unique elements in a Vector -- >>> Unique ([5, 3, 5, 2, 3, 3, 9, 0, 123]) -- [0, 2, 3, 5, 9, 123] end Placeholder; pragma Ada_2...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_34_unique.py
reworded
end Unique; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (L : Integer_Array) return Integer_Array renames Placeholder.Unique; begin pragma Assert (Candidate ([5, 3, 5, 2, 3, 3, 9, 0, 123]) = [0, 2, 3, 5, 9, 123]); end Main;
[ "\n end " ]
HumanEval_35_max_element
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Max_Element (L : Integer_Array) return Integer; -- Return maximum element in the Vector. -- >>> Max_Element ([1, 2, 3]) -- 3 -- >>> Max_Element ([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]) -- ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_35_max_element.py
reworded
end Max_Element; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (L : Integer_Array) return Integer renames Placeholder.Max_Element; begin pragma Assert (Candidate ([1, 2, 3]) = 3); pragma Assert (Candidate ([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, ...
[ "\n end " ]
HumanEval_36_fizz_buzz
adb
pragma Ada_2022; package Placeholder is function Fizz_Buzz (N : Integer) return Integer; -- Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13. -- >>> Fizz_Buzz (50) -- 0 -- >>> Fizz_Buzz (78) -- 2 -- >>> Fizz_Buzz (79) -- 3 end Placeholder; ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_36_fizz_buzz.py
reworded
end Fizz_Buzz; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Integer renames Placeholder.Fizz_Buzz; begin pragma Assert (Candidate (50) = 0); pragma Assert (Candidate (78) = 2); pragma Assert (Candidate (79) = 3); ...
[ "\n end " ]
HumanEval_37_sort_even
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Sort_Even (L : Integer_Array) return Integer_Array; -- This function takes a Vector l and returns a Vector l' such that -- l' is identical to l in the odd indicies, while its values at the even indi...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_37_sort_even.py
reworded
end Sort_Even; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (L : Integer_Array) return Integer_Array renames Placeholder.Sort_Even; begin pragma Assert (Candidate ([1, 2, 3]) = [1, 2, 3]); pragma Assert (Candidate ([5, 3, -5, 2, -3, 3, 9, 0...
[ "\n end " ]
HumanEval_39_prime_fib
adb
pragma Ada_2022; package Placeholder is function Prime_Fib (N : Integer) return Integer; -- prime_fib returns n-th number that is a Fibonacci number and it's also prime. -- >>> Prime_Fib (1) -- 2 -- >>> Prime_Fib (2) -- 3 -- >>> Prime_Fib (3) -- 5 -- >>> Prime_Fib (4) -- 13 -- >>> Prim...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_39_prime_fib.py
reworded
end Prime_Fib; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Integer renames Placeholder.Prime_Fib; begin pragma Assert (Candidate (1) = 2); pragma Assert (Candidate (2) = 3); pragma Assert (Candidate (3) = 5); pra...
[ "\n end " ]
HumanEval_40_triples_sum_to_zero
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Triples_Sum_To_Zero (L : Integer_Array) return Boolean; -- triples_sum_to_zero takes a Vector of integers as an input. -- it returns True if there are three distinct elements in the Vector that -...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_40_triples_sum_to_zero.py
reworded
end Triples_Sum_To_Zero; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (L : Integer_Array) return Boolean renames Placeholder.Triples_Sum_To_Zero; begin pragma Assert (Candidate ([1, 3, 5, 0]) = False); pragma Assert (Candidate ([1, 3, 5, -1...
[ "\n end " ]
HumanEval_41_car_race_collision
adb
pragma Ada_2022; package Placeholder is function Car_Race_Collision (N : Integer) return Integer; -- Imagine a road that's a perfectly straight infinitely long line. -- n cars are driving left to right; simultaneously, a different set of n cars -- are driving right to left. The two sets of cars start ou...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_41_car_race_collision.py
reworded
end Car_Race_Collision; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Integer renames Placeholder.Car_Race_Collision; begin pragma Assert (Candidate (2) = 4); pragma Assert (Candidate (3) = 9); pragma Assert (Candidat...
[ "\n end " ]
HumanEval_42_incr_list
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Incr_List (L : Integer_Array) return Integer_Array; -- Return Vector with elements incremented by 1. -- >>> Incr_List ([1, 2, 3]) -- [2, 3, 4] -- >>> Incr_List ([5, 3, 5, 2, 3, 3, 9, 0, 123]) ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_42_incr_list.py
reworded
end Incr_List; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (L : Integer_Array) return Integer_Array renames Placeholder.Incr_List; begin pragma Assert (Candidate ([]) = []); pragma Assert (Candidate ([3, 2, 1]) = [4, 3, 2]); pragma Asse...
[ "\n end " ]
HumanEval_43_pairs_sum_to_zero
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Pairs_Sum_To_Zero (L : Integer_Array) return Boolean; -- pairs_sum_to_zero takes a Vector of integers as an input. -- it returns True if there are two distinct elements in the Vector that -- sum ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_43_pairs_sum_to_zero.py
reworded
end Pairs_Sum_To_Zero; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (L : Integer_Array) return Boolean renames Placeholder.Pairs_Sum_To_Zero; begin pragma Assert (Candidate ([1, 3, 5, 0]) = False); pragma Assert (Candidate ([1, 3, -2, 1]) =...
[ "\n end " ]
HumanEval_44_change_base
adb
pragma Ada_2022; package Placeholder is function Change_Base (X : Integer; Base : Integer) return String; -- Change numerical base of input number x to base. -- return string representation after the conversion. -- base numbers are less than 10. -- >>> Change_Base (8, 3) -- "22" -- >>> Change_Base...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_44_change_base.py
reworded
end Change_Base; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (X : Integer; Base : Integer) return String renames Placeholder.Change_Base; begin pragma Assert (Candidate (8, 3) = "22"); pragma Assert (Candidate (9, 3) = "100"); pragma As...
[ "\n end " ]
HumanEval_45_triangle_area
adb
pragma Ada_2022; package Placeholder is function Triangle_Area (A : Integer; H : Integer) return Float; -- Given length of a side and high return area for a triangle. -- >>> Triangle_Area (5, 3) -- 7.5 end Placeholder; pragma Ada_2022; package body Placeholder is function Triangle_Area (A : Integer; ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_45_triangle_area.py
reworded
end Triangle_Area; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (A : Integer; H : Integer) return Float renames Placeholder.Triangle_Area; begin pragma Assert (Candidate (5, 3) = 7.5); pragma Assert (Candidate (2, 2) = 2.0); pragma Asser...
[ "\n end " ]
HumanEval_46_fib4
adb
pragma Ada_2022; package Placeholder is function Fib4 (N : Integer) return Integer; -- The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows: -- fib4(0) -> 0 -- fib4(1) -> 0 -- fib4(2) -> 2 -- fib4(3) -> 0 -- fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_46_fib4.py
reworded
end Fib4; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Integer renames Placeholder.Fib4; begin pragma Assert (Candidate (5) = 4); pragma Assert (Candidate (8) = 28); pragma Assert (Candidate (10) = 104); pragma As...
[ "\n end " ]
HumanEval_47_median
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Median (L : Integer_Array) return Float; -- Return median of elements in the Vector l. -- >>> Median ([3, 1, 2, 4, 5]) -- 3 -- >>> Median ([-10, 4, 6, 1000, 10, 20]) -- 15.0 end Placeholde...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_47_median.py
reworded
end Median; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (L : Integer_Array) return Float renames Placeholder.Median; begin pragma Assert (Candidate ([3, 1, 2, 4, 5]) = 3); pragma Assert (Candidate ([-10, 4, 6, 1000, 10, 20]) = 8.0); pra...
[ "\n end " ]
HumanEval_48_is_palindrome
adb
pragma Ada_2022; package Placeholder is function Is_Palindrome (Text : String) return Boolean; -- Checks if given string is a palindrome -- >>> Is_Palindrome ("") -- True -- >>> Is_Palindrome ("aba") -- True -- >>> Is_Palindrome ("aaaaa") -- True -- >>> Is_Palindrome ("zbcd") -- False en...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_48_is_palindrome.py
reworded
end Is_Palindrome; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Text : String) return Boolean renames Placeholder.Is_Palindrome; begin pragma Assert (Candidate ("") = True); pragma Assert (Candidate ("aba") = True); pragma Assert (Candi...
[ "\n end " ]
HumanEval_49_modp
adb
pragma Ada_2022; package Placeholder is function Modp (N : Integer; P : Integer) return Integer; -- Return 2^n modulo p (be aware of numerics). -- >>> Modp (3, 5) -- 3 -- >>> Modp (1101, 101) -- 2 -- >>> Modp (0, 101) -- 1 -- >>> Modp (3, 11) -- 8 -- >>> Modp (100, 101) -- 1 end Pl...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_49_modp.py
reworded
end Modp; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer; P : Integer) return Integer renames Placeholder.Modp; begin pragma Assert (Candidate (3, 5) = 3); pragma Assert (Candidate (1101, 101) = 2); pragma Assert (Candidate (0...
[ "\n end " ]
HumanEval_51_remove_vowels
adb
pragma Ada_2022; package Placeholder is function Remove_Vowels (Text : String) return String; -- remove_vowels is a function that takes string and returns string without vowels. -- >>> Remove_Vowels ("") -- "" -- >>> Remove_Vowels ("abcdef") -- "bcdf" -- >>> Remove_Vowels ("aaaaa") -- "" -- ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_51_remove_vowels.py
reworded
end Remove_Vowels; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Text : String) return String renames Placeholder.Remove_Vowels; begin pragma Assert (Candidate ("") = ""); pragma Assert (Candidate ("abcdef ghijklm") = "bcdf ghjklm"); pra...
[ "\n end " ]
HumanEval_52_below_threshold
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Below_Threshold (L : Integer_Array; T : Integer) return Boolean; -- Return True if all numbers in the Vector l are below threshold t. -- >>> Below_Threshold ([1, 2, 4, 10], 100) -- True -- >>>...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_52_below_threshold.py
reworded
end Below_Threshold; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (L : Integer_Array; T : Integer) return Boolean renames Placeholder.Below_Threshold; begin pragma Assert (Candidate ([1, 2, 4, 10], 100) = True); pragma Assert (Candidate ([1...
[ "\n end " ]
HumanEval_53_add
adb
pragma Ada_2022; package Placeholder is function Add (X : Integer; Y : Integer) return Integer; -- Add two numbers x and y -- >>> Add (2, 3) -- 5 -- >>> Add (5, 7) -- 12 end Placeholder; pragma Ada_2022; package body Placeholder is function Add (X : Integer; Y : Integer) return Integer
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_53_add.py
reworded
end Add; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (X : Integer; Y : Integer) return Integer renames Placeholder.Add; begin pragma Assert (Candidate (0, 1) = 1); pragma Assert (Candidate (1, 0) = 1); pragma Assert (Candidate (2, 3) = ...
[ "\n end " ]
HumanEval_54_same_chars
adb
pragma Ada_2022; package Placeholder is function Same_Chars (S0 : String; S1 : String) return Boolean; -- Check if two words have the same characters. -- >>> Same_Chars ("eabcdzzzz", "dddzzzzzzzddeddabc") -- True -- >>> Same_Chars ("abcd", "dddddddabc") -- True -- >>> Same_Chars ("dddddddabc", "ab...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_54_same_chars.py
reworded
end Same_Chars; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (S0 : String; S1 : String) return Boolean renames Placeholder.Same_Chars; begin pragma Assert (Candidate ("eabcdzzzz", "dddzzzzzzzddeddabc") = True); pragma Assert (Candidate ("ab...
[ "\n end " ]
HumanEval_55_fib
adb
pragma Ada_2022; package Placeholder is function Fib (N : Integer) return Integer; -- Return n-th Fibonacci number. -- >>> Fib (10) -- 55 -- >>> Fib (1) -- 1 -- >>> Fib (8) -- 21 end Placeholder; pragma Ada_2022; package body Placeholder is function Fib (N : Integer) return Integer
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_55_fib.py
reworded
end Fib; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Integer renames Placeholder.Fib; begin pragma Assert (Candidate (10) = 55); pragma Assert (Candidate (1) = 1); pragma Assert (Candidate (8) = 21); pragma Asser...
[ "\n end " ]
HumanEval_56_correct_bracketing
adb
pragma Ada_2022; package Placeholder is function Correct_Bracketing (Brackets : String) return Boolean; -- brackets is a string of "<" and ">". -- return True if every opening bracket has a corresponding closing bracket. -- >>> Correct_Bracketing ("<") -- False -- >>> Correct_Bracketing ("<>") -- ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_56_correct_bracketing.py
reworded
end Correct_Bracketing; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Brackets : String) return Boolean renames Placeholder.Correct_Bracketing; begin pragma Assert (Candidate ("<>") = True); pragma Assert (Candidate ("<<><>>") = True); p...
[ "\n end " ]
HumanEval_57_monotonic
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Monotonic (L : Integer_Array) return Boolean; -- Return True is Vector elements are monotonically increasing or decreasing. -- >>> Monotonic ([1, 2, 4, 20]) -- True -- >>> Monotonic ([1, 20, 4...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_57_monotonic.py
reworded
end Monotonic; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (L : Integer_Array) return Boolean renames Placeholder.Monotonic; begin pragma Assert (Candidate ([1, 2, 4, 10]) = True); pragma Assert (Candidate ([1, 2, 4, 20]) = True); pragm...
[ "\n end " ]
HumanEval_58_common
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Common (L1 : Integer_Array; L2 : Integer_Array) return Integer_Array; -- Return sorted unique common elements for two Vectors. -- >>> Common ([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121]) ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_58_common.py
reworded
end Common; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (L1 : Integer_Array; L2 : Integer_Array) return Integer_Array renames Placeholder.Common; begin pragma Assert (Candidate ([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121]) = [1, 5, 65...
[ "\n end " ]
HumanEval_59_largest_prime_factor
adb
pragma Ada_2022; package Placeholder is function Largest_Prime_Factor (N : Integer) return Integer; -- Return the largest prime factor of n. Assume n > 1 and is not a prime. -- >>> Largest_Prime_Factor (13195) -- 29 -- >>> Largest_Prime_Factor (2048) -- 2 end Placeholder; pragma Ada_2022; package ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_59_largest_prime_factor.py
reworded
end Largest_Prime_Factor; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Integer renames Placeholder.Largest_Prime_Factor; begin pragma Assert (Candidate (15) = 5); pragma Assert (Candidate (27) = 3); pragma Assert (Ca...
[ "\n end " ]
HumanEval_60_sum_to_n
adb
pragma Ada_2022; package Placeholder is function Sum_To_N (N : Integer) return Integer; -- sum_to_n is a function that sums numbers from 1 to n. -- >>> Sum_To_N (30) -- 465 -- >>> Sum_To_N (100) -- 5050 -- >>> Sum_To_N (5) -- 15 -- >>> Sum_To_N (10) -- 55 -- >>> Sum_To_N (1) -- 1 e...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_60_sum_to_n.py
reworded
end Sum_To_N; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Integer renames Placeholder.Sum_To_N; begin pragma Assert (Candidate (1) = 1); pragma Assert (Candidate (6) = 21); pragma Assert (Candidate (11) = 66); pr...
[ "\n end " ]
HumanEval_61_correct_bracketing
adb
pragma Ada_2022; package Placeholder is function Correct_Bracketing (Brackets : String) return Boolean; -- brackets is a string of "(" and ")". -- return True if every opening bracket has a corresponding closing bracket. -- >>> Correct_Bracketing ("(") -- False -- >>> Correct_Bracketing ("()") -- ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_61_correct_bracketing.py
reworded
end Correct_Bracketing; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Brackets : String) return Boolean renames Placeholder.Correct_Bracketing; begin pragma Assert (Candidate ("()") = True); pragma Assert (Candidate ("(()())") = True); p...
[ "\n end " ]
HumanEval_62_derivative
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Derivative (Xs : Integer_Array) return Integer_Array; -- xs represent coefficients of a polynomial. -- xs[0] + xs[1] * x + xs[2] * x^2 + .... -- Return derivative of this polynomial in the same f...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_62_derivative.py
reworded
end Derivative; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Xs : Integer_Array) return Integer_Array renames Placeholder.Derivative; begin pragma Assert (Candidate ([3, 1, 2, 4, 5]) = [1, 4, 12, 20]); pragma Assert (Candidate ([1, 2, 3]) ...
[ "\n end " ]
HumanEval_63_fibfib
adb
pragma Ada_2022; package Placeholder is function Fibfib (N : Integer) return Integer; -- The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows: -- fibfib(0) == 0 -- fibfib(1) == 0 -- fibfib(2) == 1 -- fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3)...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_63_fibfib.py
reworded
end Fibfib; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Integer renames Placeholder.Fibfib; begin pragma Assert (Candidate (2) = 1); pragma Assert (Candidate (1) = 0); pragma Assert (Candidate (5) = 4); pragma As...
[ "\n end " ]
HumanEval_64_vowels_count
adb
pragma Ada_2022; package Placeholder is function Vowels_Count (S : String) return Integer; -- Write a function vowels_count which takes a string representing -- a word as input and returns the number of vowels in the string. -- Vowels in this case are 'a', 'e', 'i', 'o', 'u'. Here, 'y' is also a -- vowe...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_64_vowels_count.py
reworded
end Vowels_Count; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (S : String) return Integer renames Placeholder.Vowels_Count; begin pragma Assert (Candidate ("abcde") = 2); pragma Assert (Candidate ("Alone") = 3); pragma Assert (Candidate...
[ "\n end " ]
HumanEval_65_circular_shift
adb
pragma Ada_2022; package Placeholder is function Circular_Shift (X : Integer; Shift : Integer) return String; -- Circular shift the digits of the integer x, shift the digits right by shift -- and return the result as a string. -- If shift > number of digits, return digits reversed. -- >>> Circular_Shift...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_65_circular_shift.py
reworded
end Circular_Shift; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (X : Integer; Shift : Integer) return String renames Placeholder.Circular_Shift; begin pragma Assert (Candidate (100, 2) = "001"); pragma Assert (Candidate (12, 2) = "12"); ...
[ "\n end " ]
HumanEval_66_digitSum
adb
pragma Ada_2022; package Placeholder is function Digit_Sum (S : String) return Integer; -- Task -- Write a function that takes a string as input and returns the sum of the upper characters only' -- ASCII codes. -- Examples: -- >>> Digitsum ("") -- 0 -- >>> Digitsum ("abAB") -- 131 -- >>> ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_66_digitSum.py
reworded
end Digit_Sum; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (S : String) return Integer renames Placeholder.Digit_Sum; begin pragma Assert (Candidate ("") = 0); pragma Assert (Candidate ("abAB") = 131); pragma Assert (Candidate ("abcCd")...
[ "\n end " ]
HumanEval_67_fruit_distribution
adb
pragma Ada_2022; package Placeholder is function Fruit_Distribution (S : String; N : Integer) return Integer; -- In this task, you will be given a string that represents a number of apples and oranges -- that are distributed in a basket of fruit this basket contains -- apples, oranges, and mango fruits. ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_67_fruit_distribution.py
reworded
end Fruit_Distribution; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (S : String; N : Integer) return Integer renames Placeholder.Fruit_Distribution; begin pragma Assert (Candidate ("5 apples and 6 oranges", 19) = 8); pragma Assert (Candida...
[ "\n end " ]
HumanEval_68_pluck
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Pluck (Arr : Integer_Array) return Integer_Array; -- "Given an array representing a branch of a tree that has non-negative integer nodes -- your task is to pluck one of the nodes and return it. -...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_68_pluck.py
reworded
end Pluck; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Arr : Integer_Array) return Integer_Array renames Placeholder.Pluck; begin pragma Assert (Candidate ([4, 2, 3]) = [2, 1]); pragma Assert (Candidate ([1, 2, 3]) = [2, 1]); pragma As...
[ "\n end " ]
HumanEval_69_search
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Search (Lst : Integer_Array) return Integer; -- You are given a non-empty Vector of positive integers. Return the greatest integer that is greater than -- zero, and has a frequency greater than or e...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_69_search.py
reworded
end Search; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Lst : Integer_Array) return Integer renames Placeholder.Search; begin pragma Assert (Candidate ([5, 5, 5, 5, 1]) = 1); pragma Assert (Candidate ([4, 1, 4, 1, 4, 4]) = 4); pragma A...
[ "\n end " ]
HumanEval_70_strange_sort_list
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Strange_Sort_List (Lst : Integer_Array) return Integer_Array; -- Given Vector of integers, return Vector in strange order. -- Strange sorting, is when you start with the minimum value, -- then ma...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_70_strange_sort_list.py
reworded
end Strange_Sort_List; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Lst : Integer_Array) return Integer_Array renames Placeholder.Strange_Sort_List; begin pragma Assert (Candidate ([1, 2, 3, 4]) = [1, 4, 2, 3]); pragma Assert (Candidate ([...
[ "\n end " ]
HumanEval_71_triangle_area
adb
pragma Ada_2022; package Placeholder is function Triangle_Area (A : Integer; B : Integer; C : Integer) return Float; -- Given the lengths of the three sides of a triangle. Return the area of -- the triangle rounded to 2 decimal points if the three sides form a valid triangle. -- Otherwise return -1 -- ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_71_triangle_area.py
reworded
end Triangle_Area; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (A : Integer; B : Integer; C : Integer) return Float renames Placeholder.Triangle_Area; begin pragma Assert (Candidate (3, 4, 5) = 6.0); pragma Assert (Candidate (1, 2, 10) = -...
[ "\n end " ]
HumanEval_72_will_it_fly
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Will_It_Fly (Q : Integer_Array; W : Integer) return Boolean; -- Write a function that returns True if the object q will fly, and False otherwise. -- The object q will fly if it's balanced (it is a p...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_72_will_it_fly.py
reworded
end Will_It_Fly; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Q : Integer_Array; W : Integer) return Boolean renames Placeholder.Will_It_Fly; begin pragma Assert (Candidate ([3, 2, 3], 9) = True); pragma Assert (Candidate ([1, 2], 5) = Fal...
[ "\n end " ]
HumanEval_73_smallest_change
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Smallest_Change (Arr : Integer_Array) return Integer; -- Given an array arr of integers, find the minimum number of elements that -- need to be changed to make the array palindromic. A palindromic a...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_73_smallest_change.py
reworded
end Smallest_Change; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Arr : Integer_Array) return Integer renames Placeholder.Smallest_Change; begin pragma Assert (Candidate ([1, 2, 3, 5, 4, 7, 9, 6]) = 4); pragma Assert (Candidate ([1, 2, 3, ...
[ "\n end " ]
HumanEval_74_total_match
adb
pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Placeholder is type Unbounded_String_Array is array (Positive range <>) of Unbounded_String; function Total_Match (Lst1 : Unbounded_String_Array; Lst2 : Unbounded_String_Array) return Unbounded_String_Array; -- Write a function th...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_74_total_match.py
reworded
end Total_Match; end Placeholder; pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Placeholder; use Placeholder; procedure Main is function Candidate (Lst1 : Unbounded_String_Array; Lst2 : Unbounded_String_Array) return Unbounded_String_Array renames Placeholder.Total_Match; beg...
[ "\n end " ]
HumanEval_75_is_multiply_prime
adb
pragma Ada_2022; package Placeholder is function Is_Multiply_Prime (A : Integer) return Boolean; -- Write a function that returns true if the given number is the multiplication of 3 prime numbers -- and false otherwise. -- Knowing that (a) is less then 100. -- Example: -- >>> Is_Multiply_Prime (30) ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_75_is_multiply_prime.py
reworded
end Is_Multiply_Prime; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (A : Integer) return Boolean renames Placeholder.Is_Multiply_Prime; begin pragma Assert (Candidate (5) = False); pragma Assert (Candidate (30) = True); pragma Assert (Ca...
[ "\n end " ]
HumanEval_76_is_simple_power
adb
pragma Ada_2022; package Placeholder is function Is_Simple_Power (X : Integer; N : Integer) return Boolean; -- Your task is to write a function that returns true if a number x is a simple -- power of n and false in other cases. -- x is a simple power of n if n**int=x -- For example: -- >>> Is_Simple_...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_76_is_simple_power.py
reworded
end Is_Simple_Power; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (X : Integer; N : Integer) return Boolean renames Placeholder.Is_Simple_Power; begin pragma Assert (Candidate (16, 2) = True); pragma Assert (Candidate (143214, 16) = False);...
[ "\n end " ]
HumanEval_77_iscube
adb
pragma Ada_2022; package Placeholder is function Iscube (A : Integer) return Boolean; -- Write a function that takes an integer a and returns True -- if this ingeger is a cube of some integer number. -- Note: you may assume the input is always valid. -- Examples: -- >>> Iscube (1) -- True -- >...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_77_iscube.py
reworded
end Iscube; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (A : Integer) return Boolean renames Placeholder.Iscube; begin pragma Assert (Candidate (1) = True); pragma Assert (Candidate (2) = False); pragma Assert (Candidate (-1) = True); ...
[ "\n end " ]
HumanEval_78_hex_key
adb
pragma Ada_2022; package Placeholder is function Hex_Key (Num : String) return Integer; -- You have been tasked to write a function that receives -- a hexadecimal number as a string and counts the number of hexadecimal -- digits that are primes (prime number, or a prime, is a natural number -- greate...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_78_hex_key.py
reworded
end Hex_Key; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Num : String) return Integer renames Placeholder.Hex_Key; begin pragma Assert (Candidate ("AB") = 1); pragma Assert (Candidate ("1077E") = 2); pragma Assert (Candidate ("ABED1A33...
[ "\n end " ]
HumanEval_79_decimal_to_binary
adb
pragma Ada_2022; package Placeholder is function Decimal_To_Binary (Decimal : Integer) return String; -- You will be given a number in decimal form and your task is to convert it to -- binary format. The function should return a string, with each character representing a binary -- number. Each character in...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_79_decimal_to_binary.py
reworded
end Decimal_To_Binary; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Decimal : Integer) return String renames Placeholder.Decimal_To_Binary; begin pragma Assert (Candidate (0) = "db0db"); pragma Assert (Candidate (32) = "db100000db"); pr...
[ "\n end " ]
HumanEval_80_is_happy
adb
pragma Ada_2022; package Placeholder is function Is_Happy (S : String) return Boolean; -- You are given a string s. -- Your task is to check if the string is hapadb or not. -- A string is hapadb if its length is at least 3 and every 3 consecutive letters are distinct -- For example: -- >>> Is_Happy (...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_80_is_happy.py
reworded
end Is_Happy; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (S : String) return Boolean renames Placeholder.Is_Happy; begin pragma Assert (Candidate ("a") = False); pragma Assert (Candidate ("aa") = False); pragma Assert (Candidate ("abcd...
[ "\n end " ]
HumanEval_81_numerical_letter_grade
adb
pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Placeholder is type Float_Array is array (Positive range <>) of Float; type Unbounded_String_Array is array (Positive range <>) of Unbounded_String; function Numerical_Letter_Grade (Grades : Float_Array) return Unbounded_String_Ar...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_81_numerical_letter_grade.py
reworded
end Numerical_Letter_Grade; end Placeholder; pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Placeholder; use Placeholder; procedure Main is function Candidate (Grades : Float_Array) return Unbounded_String_Array renames Placeholder.Numerical_Letter_Grade; begin pragma Asser...
[ "\n end " ]
HumanEval_82_prime_length
adb
pragma Ada_2022; package Placeholder is function Prime_Length (My_String : String) return Boolean; -- Write a function that takes a string and returns True if the string -- length is a prime number or False otherwise -- Examples -- >>> Prime_Length ("Hello") -- True -- >>> Prime_Length ("abcdcba")...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_82_prime_length.py
reworded
end Prime_Length; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (My_String : String) return Boolean renames Placeholder.Prime_Length; begin pragma Assert (Candidate ("Hello") = True); pragma Assert (Candidate ("abcdcba") = True); pragma A...
[ "\n end " ]
HumanEval_83_starts_one_ends
adb
pragma Ada_2022; package Placeholder is function Starts_One_Ends (N : Integer) return Integer; -- Given a positive integer n, return the count of the numbers of n-digit -- positive integers that start or end with 1. end Placeholder; pragma Ada_2022; package body Placeholder is function Starts_One_Ends (...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_83_starts_one_ends.py
reworded
end Starts_One_Ends; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Integer renames Placeholder.Starts_One_Ends; begin pragma Assert (Candidate (1) = 1); pragma Assert (Candidate (2) = 18); pragma Assert (Candidate (3)...
[ "\n end " ]
HumanEval_84_solve
adb
pragma Ada_2022; package Placeholder is function Solve (N : Integer) return String; -- Given a positive integer N, return the total sum of its digits in binary. -- Example -- >>> Solve (1000) -- "1" -- >>> Solve (150) -- "110" -- >>> Solve (147) -- "1100" -- Variables: -- @N integer ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_84_solve.py
reworded
end Solve; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return String renames Placeholder.Solve; begin pragma Assert (Candidate (1000) = "1"); pragma Assert (Candidate (150) = "110"); pragma Assert (Candidate (147) = "1100"...
[ "\n end " ]
HumanEval_85_add
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Add (Lst : Integer_Array) return Integer; -- Given a non-empty Vector of integers lst. add the even elements that are at odd indices.. -- Examples: -- >>> Add ([4, 2, 6, 7]) -- 2 end Placehol...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_85_add.py
reworded
end Add; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Lst : Integer_Array) return Integer renames Placeholder.Add; begin pragma Assert (Candidate ([4, 88]) = 88); pragma Assert (Candidate ([4, 5, 6, 7, 2, 122]) = 122); pragma Assert (Ca...
[ "\n end " ]
HumanEval_86_anti_shuffle
adb
pragma Ada_2022; package Placeholder is function Anti_Shuffle (S : String) return String; -- Write a function that takes a string and returns an ordered version of it. -- Ordered version of string, is a string where all words (separated by space) -- are replaced by a new word where all the characters arran...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_86_anti_shuffle.py
reworded
end Anti_Shuffle; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (S : String) return String renames Placeholder.Anti_Shuffle; begin pragma Assert (Candidate ("Hi") = "Hi"); pragma Assert (Candidate ("hello") = "ehllo"); pragma Assert (Cand...
[ "\n end " ]
HumanEval_87_get_row
adb
pragma Ada_2022; with Ada.Containers.Vectors; package Placeholder is package Integer_Vector is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Integer); use Integer_Vector; type Integer_Vector_Vector_Array is array (Positive range <>) of Integer_Vector.Vector; type Integer_Integer_Tuple...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_87_get_row.py
reworded
end Get_Row; end Placeholder; pragma Ada_2022; with Ada.Containers.Vectors; with Placeholder; use Placeholder; procedure Main is use Integer_Vector; function Candidate (Lst : Integer_Vector_Vector_Array; X : Integer) return Integer_Integer_Tuple_Array renames Placeholder.Get_Row; begin pragma Assert ...
[ "\n end " ]
HumanEval_88_sort_array
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Sort_Array (My_Array : Integer_Array) return Integer_Array; -- Given an array of non-negative integers, return a coadb of the given array after sorting, -- you will sort the given array in ascending...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_88_sort_array.py
reworded
end Sort_Array; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (My_Array : Integer_Array) return Integer_Array renames Placeholder.Sort_Array; begin pragma Assert (Candidate ([]) = []); pragma Assert (Candidate ([5]) = [5]); pragma Assert ...
[ "\n end " ]
HumanEval_89_encrypt
adb
pragma Ada_2022; package Placeholder is function Encrypt (S : String) return String; -- Create a function encrypt that takes a string as an argument and -- returns a string encrypted with the alphabet being rotated. -- The alphabet should be rotated in a manner such that the letters -- shift down by t...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_89_encrypt.py
reworded
end Encrypt; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (S : String) return String renames Placeholder.Encrypt; begin pragma Assert (Candidate ("hi") = "lm"); pragma Assert (Candidate ("asdfghjkl") = "ewhjklnop"); pragma Assert (Candid...
[ "\n end " ]
HumanEval_90_next_smallest
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; type Integer_Option (Valid : Boolean := False) is record case Valid is when True => Value : Integer; when False => null; end case; end record; function Next_Smallest (Lst : I...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_90_next_smallest.py
reworded
end Next_Smallest; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Lst : Integer_Array) return Integer_Option renames Placeholder.Next_Smallest; begin pragma Assert (Candidate ([1, 2, 3, 4, 5]) = (Valid => True, Value => 2)); pragma Assert (C...
[ "\n end " ]
HumanEval_91_is_bored
adb
pragma Ada_2022; package Placeholder is function Is_Bored (S : String) return Integer; -- You'll be given a string of words, and your task is to count the number -- of boredoms. A boredom is a sentence that starts with the word "I". -- Sentences are delimited by '.', '?' or '!'. -- For example: -- >>...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_91_is_bored.py
reworded
end Is_Bored; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (S : String) return Integer renames Placeholder.Is_Bored; begin pragma Assert (Candidate ("Hello world") = 0); pragma Assert (Candidate ("Is the sky blue?") = 0); pragma Assert (...
[ "\n end " ]
HumanEval_92_any_int
adb
pragma Ada_2022; package Placeholder is function Any_Int (X : Float; Y : Float; Z : Float) return Boolean; -- Create a function that takes 3 numbers. -- Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers. -- Returns false in any other cases. -- Examples...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_92_any_int.py
reworded
end Any_Int; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (X : Float; Y : Float; Z : Float) return Boolean renames Placeholder.Any_Int; begin pragma Assert (Candidate (2, 3, 1) = True); pragma Assert (Candidate (2.5, 2, 3) = False); prag...
[ "\n end " ]
HumanEval_93_encode
adb
pragma Ada_2022; package Placeholder is function Encode (Message : String) return String; -- Write a function that takes a message, and encodes in such a -- way that it swaps case of all letters, replaces all vowels in -- the message with the letter that appears 2 places ahead of that -- vowel in the...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_93_encode.py
reworded
end Encode; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Message : String) return String renames Placeholder.Encode; begin pragma Assert (Candidate ("TEST") = "tgst"); pragma Assert (Candidate ("Mudasir") = "mWDCSKR"); pragma Assert (Ca...
[ "\n end " ]
HumanEval_94_skjkasdkd
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Skjkasdkd (Lst : Integer_Array) return Integer; -- You are given a Vector of integers. -- You need to find the largest prime value and return the sum of its digits. -- Examples: -- >>> Skjkasd...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_94_skjkasdkd.py
reworded
end Skjkasdkd; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Lst : Integer_Array) return Integer renames Placeholder.Skjkasdkd; begin pragma Assert (Candidate ([0, 3, 2, 1, 3, 5, 7, 4, 5, 5, 5, 2, 181, 32, 4, 32, 3, 2, 32, 324, 4, 3]) = 10); ...
[ "\n end " ]
HumanEval_95_check_dict_case
adb
pragma Ada_2022; with Ada.Containers.Indefinite_Ordered_Maps; package Placeholder is package String_String_Dict is new Ada.Containers.Indefinite_Ordered_Maps (Key_Type => String, Element_Type => String); use String_String_Dict; function Check_Dict_Case (Dict : String_String_Dict.Map) return Boolean; -- Giv...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_95_check_dict_case.py
reworded
end Check_Dict_Case; end Placeholder; pragma Ada_2022; with Ada.Containers.Indefinite_Ordered_Maps; with Placeholder; use Placeholder; procedure Main is use String_String_Dict; function Candidate (Dict : String_String_Dict.Map) return Boolean renames Placeholder.Check_Dict_Case; begin pragma Assert (...
[ "\n end " ]
HumanEval_96_count_up_to
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Count_Up_To (N : Integer) return Integer_Array; -- Implement a function that takes an non-negative integer and returns an array of the first n -- integers that are prime numbers and less than n. ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_96_count_up_to.py
reworded
end Count_Up_To; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Integer_Array renames Placeholder.Count_Up_To; begin pragma Assert (Candidate (5) = [2, 3]); pragma Assert (Candidate (6) = [2, 3, 5]); pragma Assert (Can...
[ "\n end " ]
HumanEval_97_multiply
adb
pragma Ada_2022; package Placeholder is function Multiply (A : Integer; B : Integer) return Integer; -- Complete the function that takes two integers and returns -- the product of their unit digits. -- Assume the input is always valid. -- Examples: -- >>> Multiply (148, 412) -- 16 -- >>> Multi...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_97_multiply.py
reworded
end Multiply; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (A : Integer; B : Integer) return Integer renames Placeholder.Multiply; begin pragma Assert (Candidate (148, 412) = 16); pragma Assert (Candidate (19, 28) = 72); pragma Assert (C...
[ "\n end " ]
HumanEval_98_count_upper
adb
pragma Ada_2022; package Placeholder is function Count_Upper (S : String) return Integer; -- Given a string s, count the number of uppercase vowels in even indices. -- For example: -- >>> Count_Upper ("aBCdEf") -- 1 -- >>> Count_Upper ("abcdefg") -- 0 -- >>> Count_Upper ("dBBE") -- 0 end Pl...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_98_count_upper.py
reworded
end Count_Upper; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (S : String) return Integer renames Placeholder.Count_Upper; begin pragma Assert (Candidate ("aBCdEf") = 1); pragma Assert (Candidate ("abcdefg") = 0); pragma Assert (Candidat...
[ "\n end " ]
HumanEval_99_closest_integer
adb
pragma Ada_2022; package Placeholder is function Closest_Integer (Value : String) return Integer; -- Create a function that takes a value (string) representing a number -- and returns the closest integer to it. If the number is equidistant -- from two integers, round it away from zero. -- Examples --...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_99_closest_integer.py
reworded
end Closest_Integer; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (Value : String) return Integer renames Placeholder.Closest_Integer; begin pragma Assert (Candidate ("10") = 10); pragma Assert (Candidate ("14.5") = 15); pragma Assert (C...
[ "\n end " ]
HumanEval_100_make_a_pile
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Make_A_Pile (N : Integer) return Integer_Array; -- Given a positive integer n, you have to make a pile of n levels of stones. -- The first level has n stones. -- The number of stones in the next ...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_100_make_a_pile.py
reworded
end Make_A_Pile; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (N : Integer) return Integer_Array renames Placeholder.Make_A_Pile; begin pragma Assert (Candidate (3) = [3, 5, 7]); pragma Assert (Candidate (4) = [4, 6, 8, 10]); pragma Asse...
[ "\n end " ]
HumanEval_101_words_string
adb
pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Placeholder is type Unbounded_String_Array is array (Positive range <>) of Unbounded_String; function Words_String (S : String) return Unbounded_String_Array; -- You will be given a string of words separated by commas or spaces. Y...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_101_words_string.py
reworded
end Words_String; end Placeholder; pragma Ada_2022; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Placeholder; use Placeholder; procedure Main is function Candidate (S : String) return Unbounded_String_Array renames Placeholder.Words_String; begin pragma Assert (Candidate ("Hi, my name is ...
[ "\n end " ]
HumanEval_102_choose_num
adb
pragma Ada_2022; package Placeholder is function Choose_Num (X : Integer; Y : Integer) return Integer; -- This function takes two positive numbers x and y and returns the -- biggest even integer number that is in the range [x, y] inclusive. If -- there's no such number, then the function should return -1....
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_102_choose_num.py
reworded
end Choose_Num; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (X : Integer; Y : Integer) return Integer renames Placeholder.Choose_Num; begin pragma Assert (Candidate (12, 15) = 14); pragma Assert (Candidate (13, 12) = -1); pragma Assert ...
[ "\n end " ]
HumanEval_104_unique_digits
adb
pragma Ada_2022; package Placeholder is type Integer_Array is array (Positive range <>) of Integer; function Unique_Digits (X : Integer_Array) return Integer_Array; -- Given a Vector of positive integers x. return a sorted Vector of all -- elements that hasn't any even digit. -- Note: Returned Vector s...
transform
/mnt/ssd/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_104_unique_digits.py
reworded
end Unique_Digits; end Placeholder; pragma Ada_2022; with Placeholder; use Placeholder; procedure Main is function Candidate (X : Integer_Array) return Integer_Array renames Placeholder.Unique_Digits; begin pragma Assert (Candidate ([15, 33, 1422, 1]) = [1, 15, 33]); pragma Assert (Candidate ([152, 3...
[ "\n end " ]
End of preview. Expand in Data Studio

Dataset Card for MultiPL-E

Dataset Summary

MultiPL-E is a dataset for evaluating large language models for code generation that supports 22 programming languages. It takes the OpenAI HumanEval and the Mostly Basic Python Programs (MBPP) benchmarks and uses little compilers to translate them to other languages. It is easy to add support for new languages and benchmarks.

The dataset is divided into several configurations named SRCDATA-LANG, where SRCDATA is either "humaneval" or "mbpp" and LANG is one of the supported languages. We use the canonical file extension for each language to identify the language, e.g., "cpp" for C++, "lua" for Lua, "clj" for Clojure, and so on.

Using MultiPL-E

  • MultiPL-E is part of the BigCode Code Generation LM Harness. This is the easiest way to use MultiPL-E.

  • MultiPL-E has its own evaluation framework that supports proprietary models, the prompt ablations, more source benchmarks, and more recently added programming languages. See the MultiPL-E tutorial on how to use this framework directly.

The MultiPL-E Ablations

The MultiPL-E paper presented several ablations of the prompt for the original set of programming languages. We do not include them in the current version of MultiPL-E, but they are still available in this repository from revision d23b094 or earlier. (You can optionally pass the revision to datasets.load_dataset.)

These are the prompt variations:

  • SRCDATA-LANG-keep is the same as SRCDATA-LANG, but the text of the prompt is totally unchanged. If the original prompt had Python doctests, they remain as Python instead of being translated to LANG. If the original prompt had Python-specific terminology, e.g., "list", it remains "list", instead of being translated, e.g., to "vector" for C++.

  • SRCDATA-LANG-transform transforms the doctests to LANG but leaves the natural language text of the prompt unchanged.

  • SRCDATA-LANG-removed removes the doctests from the prompt.

Note that MBPP does not have any doctests, so the "removed" and "transform" variations are not available for MBPP.

Changelog

Version 3.3

This update fixes a Lua bug. We had a spurious stop token that would have negatively impacts all Lua results. Re-evaluting models on Lua with this fix should produce a result that is identical or slightly higher. See Issue 165 for more information.

Version 3.2

MultiPL-E now supports Ada, thanks to Rowan Walshe. Rowan identified some issues that likely have a small negative impact on the benchmark scores for existing languages. We have not updated the prompts for those languages at this time. See the discussions PR 162 and PR 163.

Version 3.1.1

This version fixes a bug that affected some TypeScript problems, thanks to Niels MΓΌndler . The issue impacts MBPP-based problems. The fix changes whitespace in a few HumanEval-based problems that should be insignificant. These are the relevant changes:

=== mbpp-ts_prompt_mbpp_253_count_integer.diff ===
- function count_integer(list1: number| string| number[]): number {
+ function count_integer(list1: (number | string | number)[]): number {
=== mbpp-ts_prompt_mbpp_278_count_first_elements.diff ===
- function count_first_elements(test_tup: number| [number, number][]): number {
+ function count_first_elements(test_tup: (number | [number, number])[]): number {
=== mbpp-ts_prompt_mbpp_294_max_val.diff ===
- function max_val(listval: string| number[]): number {
+ function max_val(listval: (string | number)[]): number {
=== mbpp-ts_prompt_mbpp_297_flatten_list.diff ===
- function flatten_list(list1: number| number[][]): number[] {
+ function flatten_list(list1: (number | number[])[]): number[] {
=== mbpp-ts_prompt_mbpp_405_check_tuplex.diff ===
- function check_tuplex(tuplex: string| number[], tuple1: any): boolean {
+ function check_tuplex(tuplex: (string | number)[], tuple1: any): boolean {
=== mbpp-ts_prompt_mbpp_410_min_val.diff ===
- function min_val(listval: string| number[]): number {
+ function min_val(listval: (string | number)[]): number {
=== mbpp-ts_prompt_mbpp_419_round_and_sum.diff ===
- function round_and_sum(list1: number| number[]): number {
+ function round_and_sum(list1: (number | number)[]): number {
=== mbpp-ts_prompt_mbpp_65_recursive_list_sum.diff ===
- function recursive_list_sum(data_list: number| number[][]): number {
+ function recursive_list_sum(data_list: (number | number[])[]): number {
=== mbpp-ts_prompt_mbpp_755_second_smallest.diff ===
- function second_smallest(numbers: number| number[]): number | undefined {
+ function second_smallest(numbers: (number | number)[]): number | undefined {

See Github Issue 160 for more information.

Version 3.1

MultiPL-E now supports Dart, thanks to Devon Carew.

Version 3.0

This is the first significant update since MultiPL-E was used in StarCoder 1.

  1. The dataset was versioned at 3.0, and we are bumping the software version to stay in sync.
  2. We no longer publish the MultiPL-E ablations, but they are available in revision d23b094 and earlier.
  3. New programming languages supported:
  4. Changes to existing HumanEval-based problems:
    • Four Scala problems have fixed prompts/tests (12, 90, 128, 162).
    • Some whitespace-only changes to problems for Racket (18 problems), R (36 problems), Julia (159 problems), and D (156 problems). We will try to avoid these kinds of changes in the future.
  5. The MBPP-based problems have changes analogous to the HumanEval-based problems.

See the directory diffs_v3.0 in the dataset repository for the diffs to each prompt.

Version 0.5.0

Instruction-following support and new languages

  • New languages: Luau, Elixir, Lean, Coq, Dafny
  • Support for instruction-following prompts
  • vLLM support for faster evaluation

Version 0.4.0

QoL improvements and new languages

  • New languages: OCaml, MATLAB
  • Using .jsonl instead of .json for prompts
  • Several bugfixes to prompts

Version 0.3.0

  • This version was used to evaluate StarCoder

  • This version corrects several bugs in prompts and test cases that resulted in lower pass@k rates for some of the statically typed languages. The most significant difference is that the pass@k for Java increases by about 2% on HumanEval.

Version 0.2.0

This version was used to evaluate SantaCoder

Downloads last month
54,185

Spaces using nuprl/MultiPL-E 5

Collection including nuprl/MultiPL-E

Papers for nuprl/MultiPL-E