org_input
stringlengths
1.09k
17.3k
gt_output
stringlengths
1.54k
17.8k
llm_input
stringclasses
1 value
dafny_input
stringclasses
1 value
output
dict
stage_tag
stringclasses
1 value
org_input_id
int64
0
299
self_id
int64
0
2.99M
self_tag
stringclasses
1 value
data_source
stringclasses
1 value
prompt
listlengths
1
1
ability
stringclasses
1 value
reward_model
dict
extra_info
dict
function digitToInt(c: char): int { (c as int) - ('0' as int) } function intToChar(i: int): char { (('0' as int) + i) as char } method stringToInt(s: seq<char>) returns (result: int) { var res := 0; var i := 0; while i < |s| invariant 0 <= i <= |s| invariant res >= 0 { var digit := digitToInt(s[...
function digitToInt(c: char): int requires '0' <= c <= '9' ensures 0 <= digitToInt(c) <= 9 ensures digitToInt(c) == (c as int) - ('0' as int) { (c as int) - ('0' as int) } function intToChar(i: int): char requires 0 <= i <= 9 ensures '0' <= intToChar(i) <= '9' ensures intToChar(i) == (('0' as int) + i) as...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
0
0
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function digitToInt(c: char): int\n requires '0' <= c <= '9'\n ensures 0 <= digitToInt(c) <= 9\n ensures digitToInt(c) == (c as int) - ('0' as int)\n{\n (c as int) - ('0' as int)\n}\nfunction intToChar(i: int): char\n requires 0 <= i <= 9\n ensures '0' <= intToChar(i) <=...
{ "index": 0, "split": "test" }
method smallestNumber_2165(num: int) returns (result: int) { var neg := num < 0; var n := if num < 0 then -num else num; var cnt := new int[10]; var i := 0; while i < 10 invariant 0 <= i <= 10 invariant cnt.Length == 10 invariant forall k :: 0 <= k < i ==> cnt[k] == 0 { ...
method smallestNumber_2165(num: int) returns (result: int) requires -1000000000000000 <= num <= 1000000000000000 ensures 1 <= result <= 10000000000000000 { var neg := num < 0; var n := if num < 0 then -num else num; var cnt := new int[10]; var i := 0; while i < 10 invariant 0 <= i <=...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
1
10,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestNumber_2165(num: int) returns (result: int)\n requires -1000000000000000 <= num <= 1000000000000000\n ensures 1 <= result <= 10000000000000000\n{\n var neg := num < 0;\n var n := if num < 0 then -num else num;\n var cnt := new int[10];\n var i ...
{ "index": 1, "split": "test" }
method digitSum(n: int) returns (sum: int) { var temp := n; sum := 0; while temp > 0 invariant temp >= 0 invariant sum >= 0 { sum := sum + (temp % 10); temp := temp / 10; } } method countLargestGroup_1399(n: int) returns (result: int) { var counts := new int[50]; ...
method digitSum(n: int) returns (sum: int) requires n >= 0 ensures sum >= 0 { var temp := n; sum := 0; while temp > 0 invariant temp >= 0 invariant sum >= 0 { sum := sum + (temp % 10); temp := temp / 10; } } method countLargestGroup_1399(n: int) returns (resul...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
2
20,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method digitSum(n: int) returns (sum: int)\n requires n >= 0\n ensures sum >= 0\n{\n var temp := n;\n sum := 0;\n while temp > 0\n invariant temp >= 0\n invariant sum >= 0\n {\n sum := sum + (temp % 10);\n temp := temp / 10;\n }...
{ "index": 2, "split": "test" }
method digitSum(n: int) returns (sum: int) { var num := n; sum := 0; while num > 0 invariant num >= 0 invariant sum >= 0 { sum := sum + (num % 10); num := num / 10; } } method lastRemaining_390(n: int) returns (result: int) { var a1 := 1; var an := n; var ...
method digitSum(n: int) returns (sum: int) requires n >= 0 ensures sum >= 0 { var num := n; sum := 0; while num > 0 invariant num >= 0 invariant sum >= 0 { sum := sum + (num % 10); num := num / 10; } } method lastRemaining_390(n: int) returns (result: int) ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
3
30,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method digitSum(n: int) returns (sum: int)\n requires n >= 0\n ensures sum >= 0\n{\n var num := n;\n sum := 0;\n while num > 0\n invariant num >= 0\n invariant sum >= 0\n {\n sum := sum + (num % 10);\n num := num / 10;\n }\n}\nm...
{ "index": 3, "split": "test" }
function gcd_func(a: int, b: int): int { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) { var x := a; var y := b; while y != 0 invariant x > 0 && y >= 0 invariant gcd_func(a, b) == gcd_func(x, y) decreases y { var temp := y...
function gcd_func(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) requires a > 0 && b > 0 ensures result > 0 ensures result == gcd_func(a, b) { var x := a; var y := b; while y != 0...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
4
40,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd_func(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a else gcd_func(b, a % b)\n}\nmethod gcd(a: int, b: int) returns (result: int)\n requires a > 0 && b > 0\n ensures result > 0\n ensures result == gcd_func(a, b...
{ "index": 4, "split": "test" }
method smallestValue_2507(n: int) returns (result: int) { var current := n; while true decreases * { var t := current; var s := 0; var i := 2; var temp := current; while i * i <= temp invariant 2 <= i invariant s >= 0 invari...
method smallestValue_2507(n: int) returns (result: int) requires 2 <= n <= 100000 ensures 1 <= result <= 100000000 decreases * { var current := n; while true decreases * { var t := current; var s := 0; var i := 2; var temp := current; while i * i <...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
5
50,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestValue_2507(n: int) returns (result: int)\n requires 2 <= n <= 100000\n ensures 1 <= result <= 100000000\n decreases *\n{\n var current := n;\n while true\n decreases *\n {\n var t := current;\n var s := 0;\n var i :=...
{ "index": 5, "split": "test" }
method DigitSum(n: int) returns (sum: int) { var num := n; sum := 0; while num > 0 invariant sum >= 0 invariant num >= 0 { sum := sum + (num % 10); num := num / 10; } } method nextGreaterElement_556(n: int) returns (result: int) { if n >= 2147483647 { retu...
method DigitSum(n: int) returns (sum: int) requires n >= 0 ensures sum >= 0 { var num := n; sum := 0; while num > 0 invariant sum >= 0 invariant num >= 0 { sum := sum + (num % 10); num := num / 10; } } method nextGreaterElement_556(n: int) returns (result: int...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
6
60,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method DigitSum(n: int) returns (sum: int)\n requires n >= 0\n ensures sum >= 0\n{\n var num := n;\n sum := 0;\n while num > 0\n invariant sum >= 0\n invariant num >= 0\n {\n sum := sum + (num % 10);\n num := num / 10;\n }\n}\nm...
{ "index": 6, "split": "test" }
method main_3node_2(o: int) returns (result: int) { var o1 := primePalindrome_866(o); var o2 := clumsy_1006(o1); var o3 := distinctSequences_2318(o2); result := o3; } method primePalindrome_866(n: int) returns (result: int) { var current := n; while true invariant current >= 1 de...
method main_3node_2(o: int) returns (result: int) requires 1 <= o <= 100000000 ensures result >= 0 decreases * { var o1 := primePalindrome_866(o); var o2 := clumsy_1006(o1); var o3 := distinctSequences_2318(o2); result := o3; } method primePalindrome_866(n: int) returns (result: int) req...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
7
70,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method main_3node_2(o: int) returns (result: int)\n requires 1 <= o <= 100000000\n ensures result >= 0\n decreases *\n{\n var o1 := primePalindrome_866(o);\n var o2 := clumsy_1006(o1);\n var o3 := distinctSequences_2318(o2);\n result := o3;\n}\nmethod prim...
{ "index": 7, "split": "test" }
method largestPalindrome_479(n: int) returns (result: int) { var mx := power10(n) - 1; var a := mx; while a > mx / 10 invariant mx / 10 <= a <= mx invariant mx == power10(n) - 1 decreases a { var b := a; var x := a; while b > 0 invariant b >= 0 invariant x >= a decrease...
method largestPalindrome_479(n: int) returns (result: int) requires 1 <= n <= 8 ensures 1 <= result <= 1336 { var mx := power10(n) - 1; var a := mx; while a > mx / 10 invariant mx / 10 <= a <= mx invariant mx == power10(n) - 1 decreases a { var b := a; var x := a; while b > 0 i...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
8
80,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method largestPalindrome_479(n: int) returns (result: int)\n requires 1 <= n <= 8\n ensures 1 <= result <= 1336\n{\n var mx := power10(n) - 1;\n var a := mx;\n while a > mx / 10\n invariant mx / 10 <= a <= mx\n invariant mx == power10(n) - 1\n decreases a\n {\n ...
{ "index": 8, "split": "test" }
method digitSum(n: int) returns (sum: int) { var num := n; sum := 0; while num > 0 invariant sum >= 0 invariant num >= 0 { sum := sum + (num % 10); num := num / 10; } } method countLargestGroup_1399(n: int) returns (result: int) { var cnt := new int[46]; var ...
method digitSum(n: int) returns (sum: int) requires n >= 0 ensures sum >= 0 { var num := n; sum := 0; while num > 0 invariant sum >= 0 invariant num >= 0 { sum := sum + (num % 10); num := num / 10; } } method countLargestGroup_1399(n: int) returns (result: int...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
9
90,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method digitSum(n: int) returns (sum: int)\n requires n >= 0\n ensures sum >= 0\n{\n var num := n;\n sum := 0;\n while num > 0\n invariant sum >= 0\n invariant num >= 0\n {\n sum := sum + (num % 10);\n num := num / 10;\n }\n}\nm...
{ "index": 9, "split": "test" }
method main_2node_1(o: int) returns (result: int) { var o1 := reverse_7(o); if o1 == 0 { result := countLargestGroup_1399(1); } else { result := countLargestGroup_1399(o1); } } function reverse_7_result(x: int): int { var ans := 0; var mi := -2147483648; var mx := 2147483647;...
method main_2node_1(o: int) returns (result: int) requires -2147483648 <= o <= 2147483648 ensures (reverse_7_result(o) == 0) ==> result == countLargestGroup_1399_result(1) ensures (reverse_7_result(o) != 0) ==> result == countLargestGroup_1399_result(reverse_7_result(o)) ensures reverse_7_result(o) == 0...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
10
100,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method main_2node_1(o: int) returns (result: int)\n requires -2147483648 <= o <= 2147483648\n ensures (reverse_7_result(o) == 0) ==> result == countLargestGroup_1399_result(1)\n ensures (reverse_7_result(o) != 0) ==> result == countLargestGroup_1399_result(reverse_7_r...
{ "index": 10, "split": "test" }
method monotoneIncreasingDigits_738(n: int) returns (result: int) { if n == 0 { result := 1; return; } var digits := intToDigits(n); var i := 1; while i < |digits| && digits[i-1] <= digits[i] invariant 1 <= i <= |digits| invariant forall k :: 0 <= k < i-1 ==> digits[k...
method monotoneIncreasingDigits_738(n: int) returns (result: int) requires 0 <= n <= 1000000000 ensures 1 <= result <= 1000000000 { if n == 0 { result := 1; return; } var digits := intToDigits(n); var i := 1; while i < |digits| && digits[i-1] <= digits[i] invariant 1 ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
11
110,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method monotoneIncreasingDigits_738(n: int) returns (result: int)\n requires 0 <= n <= 1000000000\n ensures 1 <= result <= 1000000000\n{\n if n == 0 {\n result := 1;\n return;\n }\n var digits := intToDigits(n);\n var i := 1;\n while i < |dig...
{ "index": 11, "split": "test" }
method smallestFactorization_625(num: int) returns (result: int) { if num < 2 { return num; } var ans := 0; var mul := 1; var n := num; var i := 9; while i >= 2 invariant 1 <= i <= 9 invariant n >= 1 invariant mul >= 1 invariant ans >= 0 invariant ans <= 1000000000 invariant mu...
method smallestFactorization_625(num: int) returns (result: int) requires 1 <= num <= 2147483648 ensures 0 <= result <= 1000000000 { if num < 2 { return num; } var ans := 0; var mul := 1; var n := num; var i := 9; while i >= 2 invariant 1 <= i <= 9 invariant n >= 1 invariant mul >= 1 ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
12
120,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestFactorization_625(num: int) returns (result: int)\n requires 1 <= num <= 2147483648\n ensures 0 <= result <= 1000000000\n{\n if num < 2 {\n return num;\n }\n var ans := 0;\n var mul := 1;\n var n := num;\n var i := 9;\n while i >= 2\n invariant 1 ...
{ "index": 12, "split": "test" }
method clumsy_1006(n: int) returns (result: int) { var k := 0; var stk := [n]; var x := n - 1; while x > 0 invariant 0 <= x <= n - 1 invariant 0 <= k <= 3 invariant |stk| >= 1 invariant forall i :: 0 <= i < |stk| ==> stk[i] >= -2147483648 && stk[i] <= 2147483648 d...
method clumsy_1006(n: int) returns (result: int) requires 1 <= n <= 10000 ensures 1 <= result <= 2147483648 { var k := 0; var stk := [n]; var x := n - 1; while x > 0 invariant 0 <= x <= n - 1 invariant 0 <= k <= 3 invariant |stk| >= 1 invariant forall i :: 0 <= i ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
13
130,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method clumsy_1006(n: int) returns (result: int)\n requires 1 <= n <= 10000\n ensures 1 <= result <= 2147483648\n{\n var k := 0;\n var stk := [n];\n var x := n - 1;\n while x > 0\n invariant 0 <= x <= n - 1\n invariant 0 <= k <= 3\n invar...
{ "index": 13, "split": "test" }
method reverse_7(x: int) returns (ans: int) { ans := 0; var mi := -2147483648; var mx := 2147483647; var temp_x := x; while temp_x != 0 invariant 0 <= ans <= 2147483647 decreases if temp_x >= 0 then temp_x else -temp_x { if ans < mi / 10 + 1 || ans > mx / 10 { return 0; } var y := ...
method reverse_7(x: int) returns (ans: int) requires -2147483648 <= x <= 2147483648 ensures 0 <= ans <= 2147483647 { ans := 0; var mi := -2147483648; var mx := 2147483647; var temp_x := x; while temp_x != 0 invariant 0 <= ans <= 2147483647 decreases if temp_x >= 0 then temp_x else -temp_x { ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
14
140,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method reverse_7(x: int) returns (ans: int)\n requires -2147483648 <= x <= 2147483648\n ensures 0 <= ans <= 2147483647\n{\n ans := 0;\n var mi := -2147483648;\n var mx := 2147483647;\n var temp_x := x;\n while temp_x != 0\n invariant 0 <= ans <= 2147483647\n decre...
{ "index": 14, "split": "test" }
function gcd_func(a: int, b: int): int { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) { var x := a; var y := b; while y != 0 invariant x > 0 && y >= 0 invariant gcd_func(a, b) == gcd_func(x, y) decreases y { var temp ...
function gcd_func(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) requires a > 0 && b > 0 ensures result > 0 ensures result == gcd_func(a, b) { var x := a; var y := b; while y ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
15
150,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd_func(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a\n else gcd_func(b, a % b)\n}\nmethod gcd(a: int, b: int) returns (result: int)\n requires a > 0 && b > 0\n ensures result > 0\n ensures result == gcd_func...
{ "index": 15, "split": "test" }
method reverse_7(x: int) returns (ans: int) { ans := 0; var mi := -2147483648; var mx := 2147483647; var temp_x := x; while temp_x != 0 invariant ans >= 0 invariant ans <= 1000000000 decreases if temp_x >= 0 then temp_x else -temp_x { if ans < mi / 10 + 1 || ans > mx / 10 { return 0; ...
method reverse_7(x: int) returns (ans: int) requires -2147483648 <= x <= 2147483648 ensures 0 <= ans <= 1000000000 { ans := 0; var mi := -2147483648; var mx := 2147483647; var temp_x := x; while temp_x != 0 invariant ans >= 0 invariant ans <= 1000000000 decreases if temp_x >= 0 then temp_x els...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
16
160,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method reverse_7(x: int) returns (ans: int)\n requires -2147483648 <= x <= 2147483648\n ensures 0 <= ans <= 1000000000\n{\n ans := 0;\n var mi := -2147483648;\n var mx := 2147483647;\n var temp_x := x;\n while temp_x != 0\n invariant ans >= 0\n invariant ans <= 10...
{ "index": 16, "split": "test" }
method digitSum(num: int) returns (sum: int) { var n := num; sum := 0; while n > 0 invariant sum >= 0 invariant n >= 0 { sum := sum + (n % 10); n := n / 10; } } method countLargestGroup_1399(n: int) returns (result: int) { var counts := new int[37]; var i := 0...
method digitSum(num: int) returns (sum: int) requires num >= 0 ensures sum >= 0 { var n := num; sum := 0; while n > 0 invariant sum >= 0 invariant n >= 0 { sum := sum + (n % 10); n := n / 10; } } method countLargestGroup_1399(n: int) returns (result: int) ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
17
170,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method digitSum(num: int) returns (sum: int)\n requires num >= 0\n ensures sum >= 0\n{\n var n := num;\n sum := 0;\n while n > 0\n invariant sum >= 0\n invariant n >= 0\n {\n sum := sum + (n % 10);\n n := n / 10;\n }\n}\nmethod ...
{ "index": 17, "split": "test" }
method smallestValue_2507(n: int) returns (result: int) { var current := n; while true invariant 2 <= current <= 100000 decreases * { var t := current; var s := 0; var i := 2; while i * i <= current invariant 2 <= i invariant 0 <= s ...
method smallestValue_2507(n: int) returns (result: int) requires 2 <= n <= 100000 ensures 1 <= result <= 100000 decreases * { var current := n; while true invariant 2 <= current <= 100000 decreases * { var t := current; var s := 0; var i := 2; whil...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
18
180,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestValue_2507(n: int) returns (result: int)\n requires 2 <= n <= 100000\n ensures 1 <= result <= 100000\n decreases *\n{\n var current := n;\n while true\n invariant 2 <= current <= 100000\n decreases *\n {\n var t := current;...
{ "index": 18, "split": "test" }
method numSquares_279(n: int) returns (result: int) { var m := n; while m * m > n invariant 0 <= m decreases m { m := m - 1; } var f := new int[m + 1, n + 1]; var i := 0; while i <= m invariant 0 <= i <= m + 1 invariant forall ii, jj :: 0 <= ii < i && ...
method numSquares_279(n: int) returns (result: int) requires 1 <= n <= 10000 ensures 1 <= result <= n { var m := n; while m * m > n invariant 0 <= m decreases m { m := m - 1; } var f := new int[m + 1, n + 1]; var i := 0; while i <= m invariant 0 <= i <...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
19
190,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method numSquares_279(n: int) returns (result: int)\n requires 1 <= n <= 10000\n ensures 1 <= result <= n\n{\n var m := n;\n while m * m > n\n invariant 0 <= m\n decreases m\n {\n m := m - 1;\n }\n var f := new int[m + 1, n + 1];\n ...
{ "index": 19, "split": "test" }
function gcd_func(a: int, b: int): int { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) { var x := a; var y := b; while y != 0 invariant x > 0 && y >= 0 invariant gcd_func(a, b) == gcd_func(x, y) decreases y { var temp := y; y := x % y; x :=...
function gcd_func(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) requires a > 0 && b > 0 ensures result > 0 ensures result == gcd_func(a, b) { var x := a; var y := b; while y != 0 invariant x >...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
20
200,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd_func(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a else gcd_func(b, a % b)\n}\nmethod gcd(a: int, b: int) returns (result: int)\n requires a > 0 && b > 0\n ensures result > 0\n ensures result == gcd_func(a, b)\n{\n var ...
{ "index": 20, "split": "test" }
method digitCount(n: int) returns (counts: array<int>) { counts := new int[10]; var i := 0; while i < 10 invariant 0 <= i <= 10 invariant forall j :: 0 <= j < i ==> counts[j] == 0 { counts[i] := 0; i := i + 1; } var temp := n; while temp > 0 invariant ...
method digitCount(n: int) returns (counts: array<int>) requires n >= 0 ensures counts.Length == 10 ensures forall i :: 0 <= i < 10 ==> counts[i] >= 0 { counts := new int[10]; var i := 0; while i < 10 invariant 0 <= i <= 10 invariant forall j :: 0 <= j < i ==> counts[j] == 0 {...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
21
210,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method digitCount(n: int) returns (counts: array<int>)\n requires n >= 0\n ensures counts.Length == 10\n ensures forall i :: 0 <= i < 10 ==> counts[i] >= 0\n{\n counts := new int[10];\n var i := 0;\n while i < 10\n invariant 0 <= i <= 10\n invar...
{ "index": 21, "split": "test" }
method digitSum(n: int) returns (sum: int) { var num := n; sum := 0; while num > 0 invariant sum >= 0 invariant num >= 0 { sum := sum + (num % 10); num := num / 10; } } method countLargestGroup_1399(n: int) returns (result: int) { var cnt := new int[82]; var i := 0; while i < cnt.Length ...
method digitSum(n: int) returns (sum: int) requires n >= 0 ensures sum >= 0 { var num := n; sum := 0; while num > 0 invariant sum >= 0 invariant num >= 0 { sum := sum + (num % 10); num := num / 10; } } method countLargestGroup_1399(n: int) returns (result: int) requires 1 <= n <= 10000 ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
22
220,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method digitSum(n: int) returns (sum: int)\n requires n >= 0\n ensures sum >= 0\n{\n var num := n;\n sum := 0;\n while num > 0\n invariant sum >= 0\n invariant num >= 0\n {\n sum := sum + (num % 10);\n num := num / 10;\n }\n}\nmethod countLargestGroup_1399(n...
{ "index": 22, "split": "test" }
function gcd_func(a: int, b: int): int { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) { var x := a; var y := b; while y != 0 invariant x > 0 && y >= 0 invariant gcd_func(a, b) == gcd_func(x, y) decreases y { var temp := y...
function gcd_func(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) requires a > 0 && b > 0 ensures result > 0 ensures result == gcd_func(a, b) { var x := a; var y := b; while y != 0...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
23
230,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd_func(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a else gcd_func(b, a % b)\n}\nmethod gcd(a: int, b: int) returns (result: int)\n requires a > 0 && b > 0\n ensures result > 0\n ensures result == gcd_func(a, b...
{ "index": 23, "split": "test" }
method smallestNumber_2165(num: int) returns (result: int) { var neg := num < 0; var n := if num < 0 then -num else num; var cnt := new int[10]; var i := 0; while i < 10 invariant 0 <= i <= 10 invariant forall j :: 0 <= j < i ==> cnt[j] == 0 { cnt[i] := 0; i := i + 1; } var temp := n; ...
method smallestNumber_2165(num: int) returns (result: int) requires -1000000000000000 <= num <= 1000000000000000 ensures 1 <= result <= 10000 { var neg := num < 0; var n := if num < 0 then -num else num; var cnt := new int[10]; var i := 0; while i < 10 invariant 0 <= i <= 10 invariant forall j :: ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
24
240,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestNumber_2165(num: int) returns (result: int)\n requires -1000000000000000 <= num <= 1000000000000000\n ensures 1 <= result <= 10000\n{\n var neg := num < 0;\n var n := if num < 0 then -num else num;\n var cnt := new int[10];\n var i := 0;\n while i < 10\n ...
{ "index": 24, "split": "test" }
method digitSum(n: int) returns (sum: int) { var temp := n; sum := 0; while temp > 0 invariant sum >= 0 invariant temp >= 0 { sum := sum + (temp % 10); temp := temp / 10; } } method countLargestGroup_1399(n: int) returns (result: int) { var counts := new int[46]; ...
method digitSum(n: int) returns (sum: int) requires n >= 0 ensures sum >= 0 { var temp := n; sum := 0; while temp > 0 invariant sum >= 0 invariant temp >= 0 { sum := sum + (temp % 10); temp := temp / 10; } } method countLargestGroup_1399(n: int) returns (resul...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
25
250,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method digitSum(n: int) returns (sum: int)\n requires n >= 0\n ensures sum >= 0\n{\n var temp := n;\n sum := 0;\n while temp > 0\n invariant sum >= 0\n invariant temp >= 0\n {\n sum := sum + (temp % 10);\n temp := temp / 10;\n }...
{ "index": 25, "split": "test" }
method closestFair_2417(n: int) returns (result: int) { var a := 0; var b := 0; var k := 0; var t := n; while t > 0 invariant a >= 0 && b >= 0 && k >= 0 invariant a + b == k decreases t { if t % 10 % 2 == 1 { a := a + 1; } else { b ...
method closestFair_2417(n: int) returns (result: int) requires 1 <= n <= 1000000000 ensures 1 <= result <= 10000 decreases * { var a := 0; var b := 0; var k := 0; var t := n; while t > 0 invariant a >= 0 && b >= 0 && k >= 0 invariant a + b == k decreases t { ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
26
260,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method closestFair_2417(n: int) returns (result: int)\n requires 1 <= n <= 1000000000\n ensures 1 <= result <= 10000\n decreases *\n{\n var a := 0;\n var b := 0;\n var k := 0;\n var t := n;\n while t > 0\n invariant a >= 0 && b >= 0 && k >= 0\n ...
{ "index": 26, "split": "test" }
method reverse_7(x: int) returns (ans: int) { ans := 0; var mi := -2147483648; var mx := 2147483647; var curr_x := x; while curr_x != 0 invariant ans >= 0 decreases if curr_x >= 0 then curr_x else -curr_x { if ans < mi / 10 + 1 || ans > mx / 10 { return 0; ...
method reverse_7(x: int) returns (ans: int) requires -2147483648 <= x <= 2147483648 ensures 0 <= ans { ans := 0; var mi := -2147483648; var mx := 2147483647; var curr_x := x; while curr_x != 0 invariant ans >= 0 decreases if curr_x >= 0 then curr_x else -curr_x { ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
27
270,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method reverse_7(x: int) returns (ans: int)\n requires -2147483648 <= x <= 2147483648\n ensures 0 <= ans\n{\n ans := 0;\n var mi := -2147483648;\n var mx := 2147483647;\n var curr_x := x;\n while curr_x != 0\n invariant ans >= 0\n decreases i...
{ "index": 27, "split": "test" }
method getMoneyAmount_375(n: int) returns (result: int) { var f := new int[n + 1, n + 1]; var row := 0; while row <= n invariant 0 <= row <= n + 1 { var col := 0; while col <= n invariant 0 <= col <= n + 1 { f[row, col] := 0; col := col...
method getMoneyAmount_375(n: int) returns (result: int) requires 1 <= n <= 200 ensures 1 <= result <= 10000 { var f := new int[n + 1, n + 1]; var row := 0; while row <= n invariant 0 <= row <= n + 1 { var col := 0; while col <= n invariant 0 <= col <= n + 1 ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
28
280,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method getMoneyAmount_375(n: int) returns (result: int)\n requires 1 <= n <= 200\n ensures 1 <= result <= 10000\n{\n var f := new int[n + 1, n + 1];\n var row := 0;\n while row <= n\n invariant 0 <= row <= n + 1\n {\n var col := 0;\n whil...
{ "index": 28, "split": "test" }
function gcd(a: int, b: int): int { if a == b then a else if a > b then gcd(a - b, b) else gcd(a, b - a) } method distinctSequences_2318(n: int) returns (result: int) { if n == 1 { return 6; } var mod := 1000000007; var dp := new int[n + 1, 6, 6]; var k := 0; while k <= n ...
function gcd(a: int, b: int): int requires a > 0 && b > 0 decreases a + b { if a == b then a else if a > b then gcd(a - b, b) else gcd(a, b - a) } method distinctSequences_2318(n: int) returns (result: int) requires 1 <= n <= 10000 ensures 1 <= result <= 1000000000 { if n == 1 { ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
29
290,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd(a: int, b: int): int\n requires a > 0 && b > 0\n decreases a + b\n{\n if a == b then a\n else if a > b then gcd(a - b, b)\n else gcd(a, b - a)\n}\nmethod distinctSequences_2318(n: int) returns (result: int)\n requires 1 <= n <= 10000\n ensures...
{ "index": 29, "split": "test" }
function gcd_func(a: int, b: int): int { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) { var x := a; var y := b; while y != 0 invariant x > 0 && y >= 0 invariant gcd_func(a, b) == gcd_func(x, y) decreases y { var temp := y...
function gcd_func(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) requires a > 0 && b > 0 ensures result > 0 ensures result == gcd_func(a, b) { var x := a; var y := b; while y != 0...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
30
300,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd_func(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a else gcd_func(b, a % b)\n}\nmethod gcd(a: int, b: int) returns (result: int)\n requires a > 0 && b > 0\n ensures result > 0\n ensures result == gcd_func(a, b...
{ "index": 30, "split": "test" }
method isPrime(x: int) returns (result: bool) { if x < 2 { return false; } if x == 2 { return true; } var v := 2; while v * v <= x invariant 2 <= v invariant forall k :: 2 <= k < v ==> x % k != 0 decreases x - v * v + 1 { if x % v == 0 { ...
method isPrime(x: int) returns (result: bool) requires x >= 0 ensures result <==> (x >= 2 && forall k :: 2 <= k < x ==> x % k != 0) { if x < 2 { return false; } if x == 2 { return true; } var v := 2; while v * v <= x invariant 2 <= v invariant forall k :: ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
31
310,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method isPrime(x: int) returns (result: bool)\n requires x >= 0\n ensures result <==> (x >= 2 && forall k :: 2 <= k < x ==> x % k != 0)\n{\n if x < 2 {\n return false;\n }\n if x == 2 {\n return true;\n }\n var v := 2;\n while v * v <= x\n...
{ "index": 31, "split": "test" }
method largestPalindrome_479(n: int) returns (result: int) { var mx := power10(n) - 1; var a := mx; while a > mx / 10 invariant mx / 10 <= a <= mx invariant mx == power10(n) - 1 decreases a { var b := a; var x := a; while b > 0 invariant b >= 0...
method largestPalindrome_479(n: int) returns (result: int) requires 1 <= n <= 8 ensures 1 <= result <= 100000000 { var mx := power10(n) - 1; var a := mx; while a > mx / 10 invariant mx / 10 <= a <= mx invariant mx == power10(n) - 1 decreases a { var b := a; ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
32
320,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method largestPalindrome_479(n: int) returns (result: int)\n requires 1 <= n <= 8\n ensures 1 <= result <= 100000000\n{\n var mx := power10(n) - 1;\n var a := mx;\n while a > mx / 10\n invariant mx / 10 <= a <= mx\n invariant mx == power10(n) - 1\n...
{ "index": 32, "split": "test" }
method clumsy_1006(n: int) returns (result: int) { var k := 0; var stk := [n]; var x := n - 1; while x > 0 invariant 0 <= x <= n - 1 invariant 0 <= k <= 3 invariant |stk| >= 1 invariant forall i :: 0 <= i < |stk| ==> stk[i] >= -100000 && stk[i] <= 100000000 decrea...
method clumsy_1006(n: int) returns (result: int) requires 1 <= n <= 10000 ensures 0 <= result <= 1000000000 { var k := 0; var stk := [n]; var x := n - 1; while x > 0 invariant 0 <= x <= n - 1 invariant 0 <= k <= 3 invariant |stk| >= 1 invariant forall i :: 0 <= i ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
33
330,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method clumsy_1006(n: int) returns (result: int)\n requires 1 <= n <= 10000\n ensures 0 <= result <= 1000000000\n{\n var k := 0;\n var stk := [n];\n var x := n - 1;\n while x > 0\n invariant 0 <= x <= n - 1\n invariant 0 <= k <= 3\n invar...
{ "index": 33, "split": "test" }
method countTriples_1925(n: int) returns (ans: int) { ans := 0; var a := 1; while a < n invariant 1 <= a <= n invariant 0 <= ans <= (a - 1) * (n - 1) { var b := 1; while b < n invariant 1 <= b <= n invariant 0 <= ans <= (a - 1) * (n - 1) + (b - 1) { var x := a * a + b * b; ...
method countTriples_1925(n: int) returns (ans: int) requires 1 <= n <= 250 ensures 0 <= ans <= 1000000 { ans := 0; var a := 1; while a < n invariant 1 <= a <= n invariant 0 <= ans <= (a - 1) * (n - 1) { var b := 1; while b < n invariant 1 <= b <= n invariant 0 <= ans <= (a - 1) *...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
34
340,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method countTriples_1925(n: int) returns (ans: int)\n requires 1 <= n <= 250\n ensures 0 <= ans <= 1000000\n{\n ans := 0;\n var a := 1;\n while a < n\n invariant 1 <= a <= n\n invariant 0 <= ans <= (a - 1) * (n - 1)\n {\n var b := 1;\n while b < n\n inva...
{ "index": 34, "split": "test" }
method lastRemaining_390(n: int) returns (result: int) { var a1, an := 1, n; var i, step, cnt := 0, 1, n; while cnt > 1 invariant 1 <= cnt <= n invariant step >= 1 invariant i >= 0 invariant step == power2(i) invariant a1 >= 1 - step && a1 <= n + step invarian...
method lastRemaining_390(n: int) returns (result: int) requires 1 <= n <= 1000000000 ensures 1 <= result <= n { var a1, an := 1, n; var i, step, cnt := 0, 1, n; while cnt > 1 invariant 1 <= cnt <= n invariant step >= 1 invariant i >= 0 invariant step == power2(i) ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
35
350,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method lastRemaining_390(n: int) returns (result: int)\n requires 1 <= n <= 1000000000\n ensures 1 <= result <= n\n{\n var a1, an := 1, n;\n var i, step, cnt := 0, 1, n;\n while cnt > 1\n invariant 1 <= cnt <= n\n invariant step >= 1\n invar...
{ "index": 35, "split": "test" }
method smallestValue_2507(n: int) returns (result: int) { var current := n; while true invariant 2 <= current decreases * { var t := current; var s := 0; var i := 2; while i <= current / i invariant 2 <= i invariant s >= 0 i...
method smallestValue_2507(n: int) returns (result: int) requires 2 <= n <= 100000 ensures 1 <= result <= 1000 decreases * { var current := n; while true invariant 2 <= current decreases * { var t := current; var s := 0; var i := 2; while i <= curre...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
36
360,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestValue_2507(n: int) returns (result: int)\n requires 2 <= n <= 100000\n ensures 1 <= result <= 1000\n decreases *\n{\n var current := n;\n while true\n invariant 2 <= current\n decreases *\n {\n var t := current;\n va...
{ "index": 36, "split": "test" }
function digitToInt(c: char): int { (c as int) - ('0' as int) } function intToChar(n: int): char { (('0' as int) + n) as char } method stringToInt(s: seq<char>) returns (result: int) { var res := 0; var i := 0; while i < |s| invariant 0 <= i <= |s| invariant res >= 0 { va...
function digitToInt(c: char): int requires '0' <= c <= '9' ensures 0 <= digitToInt(c) <= 9 ensures digitToInt(c) == (c as int) - ('0' as int) { (c as int) - ('0' as int) } function intToChar(n: int): char requires 0 <= n <= 9 ensures '0' <= intToChar(n) <= '9' ensures intToChar(n) == (('0' a...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
37
370,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function digitToInt(c: char): int\n requires '0' <= c <= '9'\n ensures 0 <= digitToInt(c) <= 9\n ensures digitToInt(c) == (c as int) - ('0' as int)\n{\n (c as int) - ('0' as int)\n}\nfunction intToChar(n: int): char\n requires 0 <= n <= 9\n ensures '0' <= int...
{ "index": 37, "split": "test" }
method digitSum(n: int) returns (sum: int) { var temp := n; sum := 0; while temp > 0 invariant temp >= 0 invariant sum >= 0 { sum := sum + (temp % 10); temp := temp / 10; } } method intToString(n: int) returns (s: seq<char>) { if n == 0 { s := ['0']; ...
method digitSum(n: int) returns (sum: int) requires n >= 0 ensures sum >= 0 { var temp := n; sum := 0; while temp > 0 invariant temp >= 0 invariant sum >= 0 { sum := sum + (temp % 10); temp := temp / 10; } } method intToString(n: int) returns (s: seq<char>) ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
38
380,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method digitSum(n: int) returns (sum: int)\n requires n >= 0\n ensures sum >= 0\n{\n var temp := n;\n sum := 0;\n while temp > 0\n invariant temp >= 0\n invariant sum >= 0\n {\n sum := sum + (temp % 10);\n temp := temp / 10;\n }...
{ "index": 38, "split": "test" }
method IntToString(n: int) returns (s: string) { if n == 0 { return "0"; } var digits := []; var temp := n; while temp > 0 invariant temp >= 0 invariant forall i :: 0 <= i < |digits| ==> '0' <= digits[i] <= '9' invariant temp > 0 ==> |digits| >= 0 invariant te...
method IntToString(n: int) returns (s: string) requires n >= 0 ensures |s| >= 1 ensures forall i :: 0 <= i < |s| ==> '0' <= s[i] <= '9' { if n == 0 { return "0"; } var digits := []; var temp := n; while temp > 0 invariant temp >= 0 invariant forall i :: 0 <= i < |...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
39
390,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method IntToString(n: int) returns (s: string)\n requires n >= 0\n ensures |s| >= 1\n ensures forall i :: 0 <= i < |s| ==> '0' <= s[i] <= '9'\n{\n if n == 0 {\n return \"0\";\n }\n var digits := [];\n var temp := n;\n while temp > 0\n inva...
{ "index": 39, "split": "test" }
method smallestValue_2507(n: int) returns (result: int) { var current := n; while true invariant 2 <= current <= 100000 decreases * { var t := current; var s := 0; var i := 2; var temp := current; while i <= temp / i invariant 2 <= i invariant s >= 0 invariant temp >=...
method smallestValue_2507(n: int) returns (result: int) requires 2 <= n <= 100000 ensures 1 <= result <= 100000 decreases * { var current := n; while true invariant 2 <= current <= 100000 decreases * { var t := current; var s := 0; var i := 2; var temp := current; while i <= temp...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
40
400,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestValue_2507(n: int) returns (result: int)\n requires 2 <= n <= 100000\n ensures 1 <= result <= 100000\n decreases *\n{\n var current := n;\n while true\n invariant 2 <= current <= 100000\n decreases *\n {\n var t := current;\n var s := 0;\n v...
{ "index": 40, "split": "test" }
function gcd_func(a: int, b: int): int { if b == 0 then a else gcd_func(b, a % b) } lemma gcd_bounds(a: int, b: int) { if b == 0 { } else { if a % b > 0 { gcd_bounds(b, a % b); } } } method gcd(a: int, b: int) returns (result: int) { gcd_bounds(a, b); var x := a; ...
function gcd_func(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd_func(b, a % b) } lemma gcd_bounds(a: int, b: int) requires a > 0 && b > 0 ensures gcd_func(a, b) <= a && gcd_func(a, b) <= b decreases b { if b == 0 { } else { if a % b > 0 { ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
41
410,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd_func(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a else gcd_func(b, a % b)\n}\nlemma gcd_bounds(a: int, b: int)\n requires a > 0 && b > 0\n ensures gcd_func(a, b) <= a && gcd_func(a, b) <= b\n decreases b\n{\...
{ "index": 41, "split": "test" }
method largestPalindrome_479(n: int) returns (result: int) { var mx := power10(n) - 1; var a := mx; while a > mx / 10 invariant mx / 10 <= a <= mx invariant mx == power10(n) - 1 decreases a { var b := a; var x := a; while b > 0 invariant b >= 0 invariant x >= a decrease...
method largestPalindrome_479(n: int) returns (result: int) requires 1 <= n <= 8 ensures 1 <= result <= 100000 { var mx := power10(n) - 1; var a := mx; while a > mx / 10 invariant mx / 10 <= a <= mx invariant mx == power10(n) - 1 decreases a { var b := a; var x := a; while b > 0 ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
42
420,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method largestPalindrome_479(n: int) returns (result: int)\n requires 1 <= n <= 8\n ensures 1 <= result <= 100000\n{\n var mx := power10(n) - 1;\n var a := mx;\n while a > mx / 10\n invariant mx / 10 <= a <= mx\n invariant mx == power10(n) - 1\n decreases a\n {\...
{ "index": 42, "split": "test" }
method minOperations_2571(n: int) returns (result: int) { var ans := 0; var cnt := 0; var num := n; while num > 0 invariant ans >= 0 invariant cnt >= 0 invariant num >= 0 decreases num { if num % 2 == 1 { cnt := cnt + 1; } else if cnt > 0 { ans := ans + 1; if cnt == 1...
method minOperations_2571(n: int) returns (result: int) requires 1 <= n <= 100000 ensures 1 <= result <= 250 { var ans := 0; var cnt := 0; var num := n; while num > 0 invariant ans >= 0 invariant cnt >= 0 invariant num >= 0 decreases num { if num % 2 == 1 { cnt := cnt + 1; } ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
43
430,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method minOperations_2571(n: int) returns (result: int)\n requires 1 <= n <= 100000\n ensures 1 <= result <= 250\n{\n var ans := 0;\n var cnt := 0;\n var num := n;\n while num > 0\n invariant ans >= 0\n invariant cnt >= 0\n invariant num >= 0\n decreases num\...
{ "index": 43, "split": "test" }
method getMoneyAmount_375(n: int) returns (result: int) { var f := new int[n + 1, n + 1]; var i := 0; while i <= n invariant 0 <= i <= n + 1 { var j := 0; while j <= n invariant 0 <= j <= n + 1 { f[i, j] := 0; j := j + 1; } i := i + 1; } i := n - 1; while i >= 1 ...
method getMoneyAmount_375(n: int) returns (result: int) requires 1 <= n <= 200 ensures 1 <= result <= 10000 { var f := new int[n + 1, n + 1]; var i := 0; while i <= n invariant 0 <= i <= n + 1 { var j := 0; while j <= n invariant 0 <= j <= n + 1 { f[i, j] := 0; j := j + 1; ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
44
440,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method getMoneyAmount_375(n: int) returns (result: int)\n requires 1 <= n <= 200\n ensures 1 <= result <= 10000\n{\n var f := new int[n + 1, n + 1];\n var i := 0;\n while i <= n\n invariant 0 <= i <= n + 1\n {\n var j := 0;\n while j <= n\n invariant 0 <= j...
{ "index": 44, "split": "test" }
method DigitsToInt(digits: seq<int>) returns (result: int) { result := 0; var i := 0; while i < |digits| invariant 0 <= i <= |digits| invariant result >= 0 { result := result * 10 + digits[i]; i := i + 1; } } method IntToDigits(n: int) returns (digits: seq<int>) { var temp := n; digits := ...
method DigitsToInt(digits: seq<int>) returns (result: int) requires forall i :: 0 <= i < |digits| ==> 0 <= digits[i] <= 9 requires |digits| > 0 ensures result >= 0 { result := 0; var i := 0; while i < |digits| invariant 0 <= i <= |digits| invariant result >= 0 { result := result * 10 + digits[...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
45
450,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method DigitsToInt(digits: seq<int>) returns (result: int)\n requires forall i :: 0 <= i < |digits| ==> 0 <= digits[i] <= 9\n requires |digits| > 0\n ensures result >= 0\n{\n result := 0;\n var i := 0;\n while i < |digits|\n invariant 0 <= i <= |digits|\n invariant...
{ "index": 45, "split": "test" }
method sumOfMultiples_2652(n: int) returns (result: int) { result := 0; var x := 1; while x <= n invariant 1 <= x <= n + 1 invariant result >= 0 invariant result <= x * 1000 { if x % 3 == 0 || x % 5 == 0 || x % 7 == 0 { result := result + x; } ...
method sumOfMultiples_2652(n: int) returns (result: int) requires 1 <= n <= 1000 ensures 1 <= result <= 1000000000 { result := 0; var x := 1; while x <= n invariant 1 <= x <= n + 1 invariant result >= 0 invariant result <= x * 1000 { if x % 3 == 0 || x % 5 == 0 ||...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
46
460,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method sumOfMultiples_2652(n: int) returns (result: int)\n requires 1 <= n <= 1000\n ensures 1 <= result <= 1000000000\n{\n result := 0;\n var x := 1;\n while x <= n\n invariant 1 <= x <= n + 1\n invariant result >= 0\n invariant result <= x...
{ "index": 46, "split": "test" }
method smallestValue_2507(n0: int) returns (result: int) { var n := n0; while true decreases * { var t := n; var s := 0; var i := 2; while i <= n / i invariant 2 <= i invariant s >= 0 invariant n >= 1 { while n %...
method smallestValue_2507(n0: int) returns (result: int) requires 2 <= n0 <= 100000 ensures 1 <= result <= 100000 decreases * { var n := n0; while true decreases * { var t := n; var s := 0; var i := 2; while i <= n / i invariant 2 <= i ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
47
470,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestValue_2507(n0: int) returns (result: int)\n requires 2 <= n0 <= 100000\n ensures 1 <= result <= 100000\n decreases *\n{\n var n := n0;\n while true\n decreases *\n {\n var t := n;\n var s := 0;\n var i := 2;\n ...
{ "index": 47, "split": "test" }
method digitSum(n: int) returns (sum: int) { sum := 0; var temp := n; while temp > 0 invariant temp >= 0 invariant sum >= 0 invariant temp == 0 ==> sum > 0 || n == 0 { sum := sum + (temp % 10); temp := temp / 10; } if n == 0 { sum := 0; } } met...
method digitSum(n: int) returns (sum: int) requires n >= 0 ensures sum >= 0 ensures n == 0 ==> sum == 0 ensures n > 0 ==> sum > 0 { sum := 0; var temp := n; while temp > 0 invariant temp >= 0 invariant sum >= 0 invariant temp == 0 ==> sum > 0 || n == 0 { s...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
48
480,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method digitSum(n: int) returns (sum: int)\n requires n >= 0\n ensures sum >= 0\n ensures n == 0 ==> sum == 0\n ensures n > 0 ==> sum > 0\n{\n sum := 0;\n var temp := n;\n while temp > 0\n invariant temp >= 0\n invariant sum >= 0\n inv...
{ "index": 48, "split": "test" }
method DigitCount(n: int) returns (counts: array<int>) { counts := new int[10]; var i := 0; while i < 10 invariant 0 <= i <= 10 invariant forall j :: 0 <= j < i ==> counts[j] == 0 { counts[i] := 0; i := i + 1; } var temp := n; while temp > 0 invariant ...
method DigitCount(n: int) returns (counts: array<int>) requires n >= 0 ensures counts.Length == 10 ensures forall i :: 0 <= i < 10 ==> counts[i] >= 0 { counts := new int[10]; var i := 0; while i < 10 invariant 0 <= i <= 10 invariant forall j :: 0 <= j < i ==> counts[j] == 0 {...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
49
490,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method DigitCount(n: int) returns (counts: array<int>)\n requires n >= 0\n ensures counts.Length == 10\n ensures forall i :: 0 <= i < 10 ==> counts[i] >= 0\n{\n counts := new int[10];\n var i := 0;\n while i < 10\n invariant 0 <= i <= 10\n invar...
{ "index": 49, "split": "test" }
function gcd(a: int, b: int): int { if a == b then a else if a > b then gcd(a - b, b) else gcd(a, b - a) } function gcdHelper(a: int, b: int): int { if b == 0 then a else gcdHelper(b, a % b) } function gcdSafe(a: int, b: int): int { if a >= b then gcdHelper(a, b) else gcdHelper(b, a) } method distin...
function gcd(a: int, b: int): int requires a > 0 && b > 0 ensures gcd(a, b) > 0 ensures gcd(a, b) <= a && gcd(a, b) <= b decreases if a >= b then a else b { if a == b then a else if a > b then gcd(a - b, b) else gcd(a, b - a) } function gcdHelper(a: int, b: int): int requires a > 0 && b ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
50
500,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd(a: int, b: int): int\n requires a > 0 && b > 0\n ensures gcd(a, b) > 0\n ensures gcd(a, b) <= a && gcd(a, b) <= b\n decreases if a >= b then a else b\n{\n if a == b then a\n else if a > b then gcd(a - b, b)\n else gcd(a, b - a)\n}\nfunction gc...
{ "index": 50, "split": "test" }
method getMoneyAmount_375(n: int) returns (result: int) { var f := new int[n + 1, n + 1]; var i := n - 1; while i >= 1 invariant 0 <= i <= n - 1 { var j := i + 1; while j <= n invariant i + 1 <= j <= n + 1 { if j <= n { f[i, j] := j + f[i, j - 1]; var k := i; ...
method getMoneyAmount_375(n: int) returns (result: int) requires 1 <= n <= 200 ensures 1 <= result <= 1000000000 { var f := new int[n + 1, n + 1]; var i := n - 1; while i >= 1 invariant 0 <= i <= n - 1 { var j := i + 1; while j <= n invariant i + 1 <= j <= n + 1 { if j <= n { ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
51
510,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method getMoneyAmount_375(n: int) returns (result: int)\n requires 1 <= n <= 200\n ensures 1 <= result <= 1000000000\n{\n var f := new int[n + 1, n + 1];\n var i := n - 1;\n while i >= 1\n invariant 0 <= i <= n - 1\n {\n var j := i + 1;\n while j <= n\n inv...
{ "index": 51, "split": "test" }
method reverse_7(x: int) returns (result: int) { var ans := 0; var mi := -2147483648; var mx := 2147483647; var temp_x := x; while temp_x != 0 invariant 0 <= ans <= 2147483647 invariant mi == -2147483648 invariant mx == 2147483647 decreases if temp_x >= 0 then temp_x else -temp_x { ...
method reverse_7(x: int) returns (result: int) requires -2147483648 <= x <= 2147483648 ensures 0 <= result <= 2147483647 { var ans := 0; var mi := -2147483648; var mx := 2147483647; var temp_x := x; while temp_x != 0 invariant 0 <= ans <= 2147483647 invariant mi == -2147483648 invariant m...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
52
520,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method reverse_7(x: int) returns (result: int)\n requires -2147483648 <= x <= 2147483648\n ensures 0 <= result <= 2147483647\n{\n var ans := 0;\n var mi := -2147483648; \n var mx := 2147483647; \n var temp_x := x;\n while temp_x != 0\n invariant 0 <= ans <= 214748...
{ "index": 52, "split": "test" }
method countTriples_1925(n: int) returns (ans: int) { ans := 0; var a := 1; while a < n invariant 1 <= a <= n invariant ans >= 0 { var b := 1; while b < n invariant 1 <= b <= n invariant ans >= 0 { var x := a * a + b * b; ...
method countTriples_1925(n: int) returns (ans: int) requires 1 <= n <= 250 ensures ans >= 0 { ans := 0; var a := 1; while a < n invariant 1 <= a <= n invariant ans >= 0 { var b := 1; while b < n invariant 1 <= b <= n invariant ans >= 0 ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
53
530,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method countTriples_1925(n: int) returns (ans: int)\n requires 1 <= n <= 250\n ensures ans >= 0\n{\n ans := 0;\n var a := 1;\n while a < n\n invariant 1 <= a <= n\n invariant ans >= 0\n {\n var b := 1;\n while b < n\n in...
{ "index": 53, "split": "test" }
method reverse_7(x: int) returns (result: int) { var ans := 0; var mi := -2147483648; var mx := 2147483647; var curr := x; while curr != 0 invariant 0 <= ans <= 1000000000 decreases if curr >= 0 then curr else -curr { if ans < mi / 10 + 1 || ans > mx / 10 { ...
method reverse_7(x: int) returns (result: int) requires -2147483648 <= x <= 2147483648 ensures 0 <= result <= 1000000000 { var ans := 0; var mi := -2147483648; var mx := 2147483647; var curr := x; while curr != 0 invariant 0 <= ans <= 1000000000 decreases if curr >= 0 then...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
54
540,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method reverse_7(x: int) returns (result: int)\n requires -2147483648 <= x <= 2147483648\n ensures 0 <= result <= 1000000000\n{\n var ans := 0;\n var mi := -2147483648; \n var mx := 2147483647; \n var curr := x;\n while curr != 0\n invariant 0 <= a...
{ "index": 54, "split": "test" }
method maxDiff_1432(num: int) returns (result: int) { var digits := numberToDigits(num); var n := |digits|; var maxNum := num; var i := 0; while i < n invariant 0 <= i <= n invariant maxNum >= num { if digits[i] != 9 { maxNum := replaceDigit(num, digits[i], 9)...
method maxDiff_1432(num: int) returns (result: int) requires 1 <= num <= 100000000 ensures 1 <= result <= 8 * 100000000 { var digits := numberToDigits(num); var n := |digits|; var maxNum := num; var i := 0; while i < n invariant 0 <= i <= n invariant maxNum >= num { ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
55
550,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method maxDiff_1432(num: int) returns (result: int)\n requires 1 <= num <= 100000000\n ensures 1 <= result <= 8 * 100000000\n{\n var digits := numberToDigits(num);\n var n := |digits|;\n var maxNum := num;\n var i := 0;\n while i < n\n invariant 0 <...
{ "index": 55, "split": "test" }
method smallestValue_2507(n: int) returns (result: int) { var current := n; while true invariant current >= 2 decreases * { var t := current; var s := 0; var i := 2; while i * i <= current invariant 2 <= i invariant s >= 0 i...
method smallestValue_2507(n: int) returns (result: int) requires 2 <= n <= 100000 ensures 1 <= result <= 250 decreases * { var current := n; while true invariant current >= 2 decreases * { var t := current; var s := 0; var i := 2; while i * i <= cu...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
56
560,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestValue_2507(n: int) returns (result: int)\n requires 2 <= n <= 100000\n ensures 1 <= result <= 250\n decreases *\n{\n var current := n;\n while true\n invariant current >= 2\n decreases *\n {\n var t := current;\n var...
{ "index": 56, "split": "test" }
method smallestFactorization_625(num: int) returns (result: int) { if num < 2 { return num; } var ans := 0; var mul := 1; var n := num; var i := 9; while i > 1 invariant 1 <= i <= 9 invariant n >= 1 invariant mul >= 1 invariant ans >= 0 decreases i { while n % i == 0 in...
method smallestFactorization_625(num: int) returns (result: int) requires 1 <= num <= 2147483648 ensures 0 <= result <= 2147483648 { if num < 2 { return num; } var ans := 0; var mul := 1; var n := num; var i := 9; while i > 1 invariant 1 <= i <= 9 invariant n >= 1 invariant mul >= 1 ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
57
570,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestFactorization_625(num: int) returns (result: int)\n requires 1 <= num <= 2147483648\n ensures 0 <= result <= 2147483648\n{\n if num < 2 {\n return num;\n }\n var ans := 0;\n var mul := 1;\n var n := num;\n var i := 9;\n while i > 1\n invariant 1 <...
{ "index": 57, "split": "test" }
method maximumSwap_670(num: int) returns (result: int) { var s := intToDigits(num); var n := |s|; var d := seq(n, i => i); var i := n - 2; while i >= 0 invariant -1 <= i <= n - 2 invariant |d| == n invariant forall k :: 0 <= k < n ==> 0 <= d[k] < n { if s[i] <= s[...
method maximumSwap_670(num: int) returns (result: int) requires 0 <= num <= 100000000 ensures result >= num { var s := intToDigits(num); var n := |s|; var d := seq(n, i => i); var i := n - 2; while i >= 0 invariant -1 <= i <= n - 2 invariant |d| == n invariant forall ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
58
580,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method maximumSwap_670(num: int) returns (result: int)\n requires 0 <= num <= 100000000\n ensures result >= num\n{\n var s := intToDigits(num);\n var n := |s|;\n var d := seq(n, i => i);\n var i := n - 2;\n while i >= 0\n invariant -1 <= i <= n - 2\...
{ "index": 58, "split": "test" }
method largestPalindrome_479(n: int) returns (result: int) { var mx := power10(n) - 1; var a := mx; while a > mx / 10 invariant mx / 10 < a <= mx || a == mx / 10 invariant mx == power10(n) - 1 decreases a - mx / 10 { var b := a; var x := a; while b > 0 ...
method largestPalindrome_479(n: int) returns (result: int) requires 1 <= n <= 8 ensures 0 <= result <= 1000000000 { var mx := power10(n) - 1; var a := mx; while a > mx / 10 invariant mx / 10 < a <= mx || a == mx / 10 invariant mx == power10(n) - 1 decreases a - mx / 10 { ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
59
590,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method largestPalindrome_479(n: int) returns (result: int)\n requires 1 <= n <= 8\n ensures 0 <= result <= 1000000000\n{\n var mx := power10(n) - 1;\n var a := mx;\n while a > mx / 10\n invariant mx / 10 < a <= mx || a == mx / 10\n invariant mx == ...
{ "index": 59, "split": "test" }
method countTriples_1925(n: int) returns (ans: int) { ans := 0; var a := 1; while a < n invariant 1 <= a <= n invariant 0 <= ans <= (a - 1) * (n - 1) { var b := 1; while b < n invariant 1 <= b <= n invariant 0 <= ans <= (a - 1) * (n - 1) + (b - 1) ...
method countTriples_1925(n: int) returns (ans: int) requires 1 <= n <= 250 ensures 0 <= ans <= 100000 { ans := 0; var a := 1; while a < n invariant 1 <= a <= n invariant 0 <= ans <= (a - 1) * (n - 1) { var b := 1; while b < n invariant 1 <= b <= n ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
60
600,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method countTriples_1925(n: int) returns (ans: int)\n requires 1 <= n <= 250\n ensures 0 <= ans <= 100000\n{\n ans := 0;\n var a := 1;\n while a < n\n invariant 1 <= a <= n\n invariant 0 <= ans <= (a - 1) * (n - 1)\n {\n var b := 1;\n ...
{ "index": 60, "split": "test" }
function gcd_func(a: int, b: int): int { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) { var x := a; var y := b; while y != 0 invariant x > 0 && y >= 0 invariant gcd_func(a, b) == gcd_func(x, y) decreases y { var temp := y; y := x % y; x :=...
function gcd_func(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) requires a > 0 && b > 0 ensures result > 0 ensures result == gcd_func(a, b) { var x := a; var y := b; while y != 0 invariant x >...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
61
610,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd_func(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a else gcd_func(b, a % b)\n}\nmethod gcd(a: int, b: int) returns (result: int)\n requires a > 0 && b > 0\n ensures result > 0\n ensures result == gcd_func(a, b)\n{\n var ...
{ "index": 61, "split": "test" }
method IntToString(n: int) returns (s: string) { if n == 0 { return "0"; } var digits := []; var temp := n; while temp > 0 invariant temp >= 0 invariant forall i :: 0 <= i < |digits| ==> '0' <= digits[i] <= '9' invariant temp > 0 ==> |digits| >= 0 invariant te...
method IntToString(n: int) returns (s: string) requires n >= 0 ensures |s| >= 1 ensures forall i :: 0 <= i < |s| ==> '0' <= s[i] <= '9' { if n == 0 { return "0"; } var digits := []; var temp := n; while temp > 0 invariant temp >= 0 invariant forall i :: 0 <= i < |...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
62
620,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method IntToString(n: int) returns (s: string)\n requires n >= 0\n ensures |s| >= 1\n ensures forall i :: 0 <= i < |s| ==> '0' <= s[i] <= '9'\n{\n if n == 0 {\n return \"0\";\n }\n var digits := [];\n var temp := n;\n while temp > 0\n inva...
{ "index": 62, "split": "test" }
method smallestValue_2507(n: int) returns (result: int) { var current := n; while true invariant current >= 2 decreases * { var t := current; var s := 0; var i := 2; while i <= current / i invariant i >= 2 invariant s >= 0 i...
method smallestValue_2507(n: int) returns (result: int) requires 2 <= n <= 100000 ensures 1 <= result <= 100000000 decreases * { var current := n; while true invariant current >= 2 decreases * { var t := current; var s := 0; var i := 2; while i <= ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
63
630,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestValue_2507(n: int) returns (result: int)\n requires 2 <= n <= 100000\n ensures 1 <= result <= 100000000\n decreases *\n{\n var current := n;\n while true\n invariant current >= 2\n decreases *\n {\n var t := current;\n ...
{ "index": 63, "split": "test" }
method maxDiff_1432(num: int) returns (result: int) { var digits := numToDigits(num); var n := |digits|; var maxDigits := digits[..]; var i := 0; while i < n invariant 0 <= i <= n invariant |maxDigits| == n invariant forall j :: 0 <= j < |maxDigits| ==> 0 <= maxDigits[j] <= 9...
method maxDiff_1432(num: int) returns (result: int) requires 1 <= num <= 100000000 ensures 1 <= result <= 250 { var digits := numToDigits(num); var n := |digits|; var maxDigits := digits[..]; var i := 0; while i < n invariant 0 <= i <= n invariant |maxDigits| == n inv...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
64
640,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method maxDiff_1432(num: int) returns (result: int)\n requires 1 <= num <= 100000000\n ensures 1 <= result <= 250\n{\n var digits := numToDigits(num);\n var n := |digits|;\n var maxDigits := digits[..];\n var i := 0;\n while i < n\n invariant 0 <= i...
{ "index": 64, "split": "test" }
method clumsy_1006(n: int) returns (result: int) { var k := 0; var stk := [n]; var x := n - 1; while x > 0 invariant 0 <= x <= n - 1 invariant 0 <= k <= 3 invariant |stk| >= 1 invariant forall i :: 0 <= i < |stk| ==> -1000000000 <= stk[i] <= 1000000000 decreases x...
method clumsy_1006(n: int) returns (result: int) requires 1 <= n <= 10000 ensures 1 <= result <= 250 { var k := 0; var stk := [n]; var x := n - 1; while x > 0 invariant 0 <= x <= n - 1 invariant 0 <= k <= 3 invariant |stk| >= 1 invariant forall i :: 0 <= i < |stk|...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
65
650,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method clumsy_1006(n: int) returns (result: int)\n requires 1 <= n <= 10000\n ensures 1 <= result <= 250\n{\n var k := 0;\n var stk := [n];\n var x := n - 1;\n while x > 0\n invariant 0 <= x <= n - 1\n invariant 0 <= k <= 3\n invariant |s...
{ "index": 65, "split": "test" }
function gcd(a: int, b: int): int { if b == 0 then a else gcd(b, a % b) } method nextBeautifulNumber_2048(n: int) returns (result: int) { var x := n + 1; while x <= 2147483648 invariant x >= n + 1 decreases 2147483648 - x { var y := x; var cnt := new int[10]; var ...
function gcd(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd(b, a % b) } method nextBeautifulNumber_2048(n: int) returns (result: int) requires 0 <= n <= 1000000 ensures 1 <= result <= 2147483648 { var x := n + 1; while x <= 2147483648 invariant ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
66
660,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a else gcd(b, a % b)\n}\nmethod nextBeautifulNumber_2048(n: int) returns (result: int)\n requires 0 <= n <= 1000000\n ensures 1 <= result <= 2147483648\n{\n var x :...
{ "index": 66, "split": "test" }
method digitSum(n: int) returns (sum: int) { var temp := n; sum := 0; while temp > 0 invariant sum >= 0 invariant temp >= 0 invariant n >= 1 ==> (temp > 0 || sum > 0) decreases temp { sum := sum + (temp % 10); temp := temp / 10; } } method countLargest...
method digitSum(n: int) returns (sum: int) requires n >= 1 ensures sum >= 1 { var temp := n; sum := 0; while temp > 0 invariant sum >= 0 invariant temp >= 0 invariant n >= 1 ==> (temp > 0 || sum > 0) decreases temp { sum := sum + (temp % 10); temp ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
67
670,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method digitSum(n: int) returns (sum: int)\n requires n >= 1\n ensures sum >= 1\n{\n var temp := n;\n sum := 0;\n while temp > 0\n invariant sum >= 0\n invariant temp >= 0\n invariant n >= 1 ==> (temp > 0 || sum > 0)\n decreases temp\...
{ "index": 67, "split": "test" }
function gcd_func(a: int, b: int): int { if b == 0 then a else gcd_func(b, a % b) } lemma gcd_func_properties(a: int, b: int) { if b == 0 { } else { gcd_func_properties(b, a % b); if a % b > 0 { gcd_func_properties(a % b, b % (a % b)); } } } method gcd(a: int, b: int) returns (result: int) {...
function gcd_func(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd_func(b, a % b) } lemma gcd_func_properties(a: int, b: int) requires a > 0 && b >= 0 ensures gcd_func(a, b) > 0 ensures b > 0 ==> gcd_func(a, b) == gcd_func(b, a) decreases b { if b == 0 { } else {...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
68
680,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd_func(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a\n else gcd_func(b, a % b)\n}\nlemma gcd_func_properties(a: int, b: int)\n requires a > 0 && b >= 0\n ensures gcd_func(a, b) > 0\n ensures b > 0 ==> gcd_func(a, b) == gc...
{ "index": 68, "split": "test" }
method reverse_7(x: int) returns (ans: int) { ans := 0; var mi := -2147483648; var mx := 2147483647; var temp_x := x; while temp_x != 0 invariant ans >= 0 decreases if temp_x >= 0 then temp_x else -temp_x { if ans < mi / 10 + 1 || ans > mx / 10 { ans := 0...
method reverse_7(x: int) returns (ans: int) requires -2147483648 <= x <= 2147483648 ensures 0 <= ans <= 100000000 { ans := 0; var mi := -2147483648; var mx := 2147483647; var temp_x := x; while temp_x != 0 invariant ans >= 0 decreases if temp_x >= 0 then temp_x else -tem...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
69
690,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method reverse_7(x: int) returns (ans: int)\n requires -2147483648 <= x <= 2147483648\n ensures 0 <= ans <= 100000000\n{\n ans := 0;\n var mi := -2147483648; \n var mx := 2147483647; \n var temp_x := x;\n while temp_x != 0\n invariant ans >= 0\n ...
{ "index": 69, "split": "test" }
method maxDiff_1432(num: int) returns (result: int) { var digits := intToDigits(num); var maxDigits := digits[..]; var minDigits := digits[..]; var i := 0; while i < |maxDigits| invariant 0 <= i <= |maxDigits| invariant |maxDigits| == |digits| invariant forall j :: 0 <= j < |maxDigits| ==> 0 <= ma...
method maxDiff_1432(num: int) returns (result: int) requires 1 <= num <= 100000000 ensures 0 <= result <= 999999999 { var digits := intToDigits(num); var maxDigits := digits[..]; var minDigits := digits[..]; var i := 0; while i < |maxDigits| invariant 0 <= i <= |maxDigits| invariant |maxDigits| ==...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
70
700,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method maxDiff_1432(num: int) returns (result: int)\n requires 1 <= num <= 100000000\n ensures 0 <= result <= 999999999\n{\n var digits := intToDigits(num);\n var maxDigits := digits[..];\n var minDigits := digits[..];\n var i := 0;\n while i < |maxDigits|\n invarian...
{ "index": 70, "split": "test" }
method digitSum(n: int) returns (sum: int) { var temp := n; sum := 0; while temp > 0 invariant sum >= 0 invariant temp >= 0 { sum := sum + (temp % 10); temp := temp / 10; } } method countLargestGroup_1399(n: int) returns (result: int) { var cnt := new int[82]; ...
method digitSum(n: int) returns (sum: int) requires n >= 0 ensures sum >= 0 { var temp := n; sum := 0; while temp > 0 invariant sum >= 0 invariant temp >= 0 { sum := sum + (temp % 10); temp := temp / 10; } } method countLargestGroup_1399(n: int) returns (resul...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
71
710,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method digitSum(n: int) returns (sum: int)\n requires n >= 0\n ensures sum >= 0\n{\n var temp := n;\n sum := 0;\n while temp > 0\n invariant sum >= 0\n invariant temp >= 0\n {\n sum := sum + (temp % 10);\n temp := temp / 10;\n }...
{ "index": 71, "split": "test" }
method getMoneyAmount_375(n: int) returns (result: int) { var f := new int[n + 1, n + 1]; var row := 0; while row <= n invariant 0 <= row <= n + 1 { var col := 0; while col <= n invariant 0 <= col <= n + 1 { f[row, col] := 0; col := col...
method getMoneyAmount_375(n: int) returns (result: int) requires 1 <= n <= 200 ensures 1 <= result <= 1000000000 { var f := new int[n + 1, n + 1]; var row := 0; while row <= n invariant 0 <= row <= n + 1 { var col := 0; while col <= n invariant 0 <= col <= n +...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
72
720,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method getMoneyAmount_375(n: int) returns (result: int)\n requires 1 <= n <= 200\n ensures 1 <= result <= 1000000000\n{\n var f := new int[n + 1, n + 1];\n var row := 0;\n while row <= n\n invariant 0 <= row <= n + 1\n {\n var col := 0;\n ...
{ "index": 72, "split": "test" }
method integerReplacement_397(n: int) returns (result: int) { var current := n; var ans := 0; while current != 1 && ans < 200 invariant current >= 1 invariant ans >= 0 invariant ans <= 200 decreases if current == 1 then 0 else 200 - ans { if current % 2 == 0 { ...
method integerReplacement_397(n: int) returns (result: int) requires 1 <= n <= 2147483648 ensures 1 <= result <= 200 { var current := n; var ans := 0; while current != 1 && ans < 200 invariant current >= 1 invariant ans >= 0 invariant ans <= 200 decreases if current =...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
73
730,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method integerReplacement_397(n: int) returns (result: int)\n requires 1 <= n <= 2147483648\n ensures 1 <= result <= 200\n{\n var current := n;\n var ans := 0;\n while current != 1 && ans < 200\n invariant current >= 1\n invariant ans >= 0\n ...
{ "index": 73, "split": "test" }
method maxDiff_1432(num: int) returns (result: int) { var numStr := IntToString(num); var a := numStr; var b := numStr; var i := 0; while i < |a| invariant 0 <= i <= |a| invariant IsDigitString(a) { if a[i] != '9' { a := ReplaceChar(a, a[i], '9'); ...
method maxDiff_1432(num: int) returns (result: int) requires 1 <= num <= 100000000 ensures 1 <= result <= 999999999 { var numStr := IntToString(num); var a := numStr; var b := numStr; var i := 0; while i < |a| invariant 0 <= i <= |a| invariant IsDigitString(a) { i...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
74
740,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method maxDiff_1432(num: int) returns (result: int)\n requires 1 <= num <= 100000000\n ensures 1 <= result <= 999999999\n{\n var numStr := IntToString(num);\n var a := numStr;\n var b := numStr;\n var i := 0;\n while i < |a|\n invariant 0 <= i <= |a...
{ "index": 74, "split": "test" }
method smallestValue_2507(n0: int) returns (result: int) { var n := n0; var iterations := 0; while iterations < 1000 invariant n >= 1 invariant iterations >= 0 decreases 1000 - iterations { var t := n; var s := 0; var i := 2; var original_n := n; while i * i <= n invariant ...
method smallestValue_2507(n0: int) returns (result: int) requires 2 <= n0 <= 100000 ensures result >= 2 ensures result <= 1000000000 { var n := n0; var iterations := 0; while iterations < 1000 invariant n >= 1 invariant iterations >= 0 decreases 1000 - iterations { var t := n; var s :=...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
75
750,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestValue_2507(n0: int) returns (result: int)\n requires 2 <= n0 <= 100000\n ensures result >= 2\n ensures result <= 1000000000\n{\n var n := n0;\n var iterations := 0;\n while iterations < 1000\n invariant n >= 1\n invariant iterations >= 0\n decreas...
{ "index": 75, "split": "test" }
method digitSum(n: int) returns (sum: int) { sum := 0; var temp := n; while temp > 0 invariant sum >= 0 invariant temp >= 0 { sum := sum + (temp % 10); temp := temp / 10; } } method countLargestGroup_1399(n: int) returns (result: int) { var cnt := new int[82]; ...
method digitSum(n: int) returns (sum: int) requires n >= 0 ensures sum >= 0 { sum := 0; var temp := n; while temp > 0 invariant sum >= 0 invariant temp >= 0 { sum := sum + (temp % 10); temp := temp / 10; } } method countLargestGroup_1399(n: int) returns (resul...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
76
760,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method digitSum(n: int) returns (sum: int)\n requires n >= 0\n ensures sum >= 0\n{\n sum := 0;\n var temp := n;\n while temp > 0\n invariant sum >= 0\n invariant temp >= 0\n {\n sum := sum + (temp % 10);\n temp := temp / 10;\n }...
{ "index": 76, "split": "test" }
method DigitsToInt(digits: seq<int>) returns (result: int) { result := 0; var multiplier := 1; var i := |digits| - 1; while i >= 0 invariant -1 <= i < |digits| invariant result >= 0 invariant multiplier > 0 { result := result + digits[i] * multiplier; multiplier := multiplier * 10; i :...
method DigitsToInt(digits: seq<int>) returns (result: int) requires forall i :: 0 <= i < |digits| ==> 0 <= digits[i] <= 9 requires |digits| > 0 ensures result >= 0 { result := 0; var multiplier := 1; var i := |digits| - 1; while i >= 0 invariant -1 <= i < |digits| invariant result >= 0 invaria...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
77
770,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method DigitsToInt(digits: seq<int>) returns (result: int)\n requires forall i :: 0 <= i < |digits| ==> 0 <= digits[i] <= 9\n requires |digits| > 0\n ensures result >= 0\n{\n result := 0;\n var multiplier := 1;\n var i := |digits| - 1;\n while i >= 0\n invariant -1 <...
{ "index": 77, "split": "test" }
function gcd(a: int, b: int): int { if b == 0 then a else gcd(b, a % b) } method largestPalindrome_479(n: int) returns (result: int) { var mx := pow10(n) - 1; var a := mx; while a > mx / 10 invariant mx / 10 <= a <= mx decreases a { var b := a; var x := a; whi...
function gcd(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd(b, a % b) } method largestPalindrome_479(n: int) returns (result: int) requires 1 <= n <= 8 ensures 1 <= result <= 10000 { var mx := pow10(n) - 1; var a := mx; while a > mx / 10 inv...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
78
780,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a else gcd(b, a % b)\n}\nmethod largestPalindrome_479(n: int) returns (result: int)\n requires 1 <= n <= 8\n ensures 1 <= result <= 10000\n{\n var mx := pow10(n) - ...
{ "index": 78, "split": "test" }
method smallestValue_2507(n0: int) returns (result: int) { var n := n0; while true invariant 2 <= n decreases * { var t := n; var s := 0; var i := 2; while i <= n / i invariant 2 <= i invariant s >= 0 invariant n >= 1 ...
method smallestValue_2507(n0: int) returns (result: int) requires 2 <= n0 <= 100000 ensures 1 <= result <= 1000 decreases * { var n := n0; while true invariant 2 <= n decreases * { var t := n; var s := 0; var i := 2; while i <= n / i in...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
79
790,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestValue_2507(n0: int) returns (result: int)\n requires 2 <= n0 <= 100000\n ensures 1 <= result <= 1000\n decreases *\n{\n var n := n0;\n while true\n invariant 2 <= n\n decreases *\n {\n var t := n;\n var s := 0;\n ...
{ "index": 79, "split": "test" }
method getMoneyAmount_375(n: int) returns (result: int) { var f := new int[n + 1, n + 1]; var i := n - 1; while i >= 1 invariant 0 <= i <= n - 1 { var j := i + 1; while j <= n invariant i + 1 <= j <= n + 1 { f[i, j] := j + (if j == 0 then 0 else f[...
method getMoneyAmount_375(n: int) returns (result: int) requires 1 <= n <= 200 ensures 1 <= result <= 10000 { var f := new int[n + 1, n + 1]; var i := n - 1; while i >= 1 invariant 0 <= i <= n - 1 { var j := i + 1; while j <= n invariant i + 1 <= j <= n + 1 ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
80
800,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method getMoneyAmount_375(n: int) returns (result: int)\n requires 1 <= n <= 200\n ensures 1 <= result <= 10000\n{\n var f := new int[n + 1, n + 1];\n var i := n - 1;\n while i >= 1\n invariant 0 <= i <= n - 1\n {\n var j := i + 1;\n whil...
{ "index": 80, "split": "test" }
function gcd(a: int, b: int): int { if a == b then a else if a < b then gcd(a, b - a) else gcd(a - b, b) } function power10(k: int): int { if k == 0 then 1 else 10 * power10(k - 1) } function countDigits(n: int): int { if n < 10 then 1 else 1 + countDigits(n / 10) } function countOddDigits(n: int): ...
function gcd(a: int, b: int): int requires a > 0 && b > 0 decreases if a < b then b else a { if a == b then a else if a < b then gcd(a, b - a) else gcd(a - b, b) } function power10(k: int): int requires k >= 0 ensures power10(k) > 0 { if k == 0 then 1 else 10 * power10(k - 1) } function ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
81
810,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd(a: int, b: int): int\n requires a > 0 && b > 0\n decreases if a < b then b else a\n{\n if a == b then a\n else if a < b then gcd(a, b - a)\n else gcd(a - b, b)\n}\nfunction power10(k: int): int\n requires k >= 0\n ensures power10(k) > 0\n{\n ...
{ "index": 81, "split": "test" }
method smallestValue_2507(n: int) returns (result: int) { var current := n; while true decreases * { var t := current; var s := 0; var i := 2; while i <= current / i invariant 2 <= i invariant s >= 0 invariant current >= 1 { while current % i == 0 invariant ...
method smallestValue_2507(n: int) returns (result: int) requires 2 <= n <= 100000 ensures 1 <= result <= 10000 decreases * { var current := n; while true decreases * { var t := current; var s := 0; var i := 2; while i <= current / i invariant 2 <= i invariant s >= 0 inv...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
82
820,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestValue_2507(n: int) returns (result: int)\n requires 2 <= n <= 100000\n ensures 1 <= result <= 10000\n decreases *\n{\n var current := n;\n while true\n decreases *\n {\n var t := current;\n var s := 0;\n var i := 2;\n while i <= current / i\...
{ "index": 82, "split": "test" }
method clumsy_1006(n: int) returns (result: int) { var k := 0; var stk := [n]; var x := n - 1; while x > 0 invariant 0 <= x <= n - 1 invariant 0 <= k <= 3 invariant |stk| >= 1 decreases x { if k == 0 { var top := stk[|stk| - 1]; stk := stk[..|stk| - 1] + [top * x]; } else i...
method clumsy_1006(n: int) returns (result: int) requires 1 <= n <= 10000 ensures 1 <= result <= 2147483648 { var k := 0; var stk := [n]; var x := n - 1; while x > 0 invariant 0 <= x <= n - 1 invariant 0 <= k <= 3 invariant |stk| >= 1 decreases x { if k == 0 { var top := stk[|stk...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
83
830,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method clumsy_1006(n: int) returns (result: int)\n requires 1 <= n <= 10000\n ensures 1 <= result <= 2147483648\n{\n var k := 0;\n var stk := [n];\n var x := n - 1;\n while x > 0\n invariant 0 <= x <= n - 1\n invariant 0 <= k <= 3\n invariant |stk| >= 1\n dec...
{ "index": 83, "split": "test" }
function gcd_func(a: int, b: int): int { if b == 0 then a else gcd_func(b, a % b) } lemma gcd_properties(a: int, b: int) { if b == 0 { } else { assert a % b >= 0; gcd_properties(b, a % b); } } method gcd(a: int, b: int) returns (result: int) { var x := a; var y := b; gcd_prop...
function gcd_func(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd_func(b, a % b) } lemma gcd_properties(a: int, b: int) requires a > 0 && b >= 0 ensures gcd_func(a, b) > 0 ensures gcd_func(a, b) <= a ensures b > 0 ==> gcd_func(a, b) <= b ensures b > ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
84
840,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd_func(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a else gcd_func(b, a % b)\n}\nlemma gcd_properties(a: int, b: int)\n requires a > 0 && b >= 0\n ensures gcd_func(a, b) > 0\n ensures gcd_func(a, b) <= a\n e...
{ "index": 84, "split": "test" }
method isPrime(x: int) returns (result: bool) { if x < 2 { return false; } if x == 2 { return true; } var v := 2; while v * v <= x invariant 2 <= v invariant forall k :: 2 <= k < v ==> x % k != 0 decreases x - v * v + 1 { if x % v == 0 { ...
method isPrime(x: int) returns (result: bool) requires x >= 0 ensures result <==> (x >= 2 && forall k :: 2 <= k < x ==> x % k != 0) { if x < 2 { return false; } if x == 2 { return true; } var v := 2; while v * v <= x invariant 2 <= v invariant forall k :: ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
85
850,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method isPrime(x: int) returns (result: bool)\n requires x >= 0\n ensures result <==> (x >= 2 && forall k :: 2 <= k < x ==> x % k != 0)\n{\n if x < 2 {\n return false;\n }\n if x == 2 {\n return true;\n }\n var v := 2;\n while v * v <= x\n...
{ "index": 85, "split": "test" }
function gcd(a: int, b: int): int { if a == b then a else if a < b then gcd(a, b - a) else gcd(a - b, b) } method clumsy_1006(n: int) returns (result: int) { var k := 0; var stk := [n]; var x := n - 1; while x > 0 invariant 0 <= x <= n - 1 invariant 0 <= k <= 3 invari...
function gcd(a: int, b: int): int requires a > 0 && b > 0 decreases if a < b then b else a { if a == b then a else if a < b then gcd(a, b - a) else gcd(a - b, b) } method clumsy_1006(n: int) returns (result: int) requires 1 <= n <= 10000 ensures 1 <= result <= 10000 { var k := 0; var...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
86
860,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd(a: int, b: int): int\n requires a > 0 && b > 0\n decreases if a < b then b else a\n{\n if a == b then a\n else if a < b then gcd(a, b - a)\n else gcd(a - b, b)\n}\nmethod clumsy_1006(n: int) returns (result: int)\n requires 1 <= n <= 10000\n e...
{ "index": 86, "split": "test" }
method reverse_7(x: int) returns (ans: int) { ans := 0; var mi := -2147483648; var mx := 2147483647; var temp_x := x; while temp_x != 0 invariant 0 <= ans <= 2147483647 decreases if temp_x >= 0 then temp_x else -temp_x { if ans < mi / 10 + 1 || ans > mx / 10 { ...
method reverse_7(x: int) returns (ans: int) requires -2147483648 <= x <= 2147483648 ensures 0 <= ans <= 2147483647 { ans := 0; var mi := -2147483648; var mx := 2147483647; var temp_x := x; while temp_x != 0 invariant 0 <= ans <= 2147483647 decreases if temp_x >= 0 then temp_x...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
87
870,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method reverse_7(x: int) returns (ans: int)\n requires -2147483648 <= x <= 2147483648\n ensures 0 <= ans <= 2147483647\n{\n ans := 0;\n var mi := -2147483648;\n var mx := 2147483647;\n var temp_x := x;\n while temp_x != 0\n invariant 0 <= ans <= 214...
{ "index": 87, "split": "test" }
method isPrime(x: int) returns (result: bool) { if x < 2 { return false; } if x == 2 { return true; } var v := 2; while v * v <= x invariant 2 <= v invariant forall k :: 2 <= k < v ==> x % k != 0 decreases x - v * v + 1 { if x % v == 0 { ...
method isPrime(x: int) returns (result: bool) requires x >= 0 ensures result <==> (x >= 2 && forall k :: 2 <= k < x ==> x % k != 0) { if x < 2 { return false; } if x == 2 { return true; } var v := 2; while v * v <= x invariant 2 <= v invariant forall k :: ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
88
880,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method isPrime(x: int) returns (result: bool)\n requires x >= 0\n ensures result <==> (x >= 2 && forall k :: 2 <= k < x ==> x % k != 0)\n{\n if x < 2 {\n return false;\n }\n if x == 2 {\n return true;\n }\n var v := 2;\n while v * v <= x\n...
{ "index": 88, "split": "test" }
function gcd_func(a: int, b: int): int { if b == 0 then a else gcd_func(b, a % b) } lemma gcd_properties(a: int, b: int) { if b == 0 { } else { assert a % b >= 0 && a % b < b; gcd_properties(b, a % b); } } method gcd(a: int, b: int) returns (result: int) { gcd_properties(a, b); v...
function gcd_func(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd_func(b, a % b) } lemma gcd_properties(a: int, b: int) requires a > 0 && b >= 0 ensures gcd_func(a, b) > 0 ensures gcd_func(a, b) <= a ensures b > 0 ==> gcd_func(a, b) <= b ensures b > ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
89
890,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd_func(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a else gcd_func(b, a % b)\n}\nlemma gcd_properties(a: int, b: int)\n requires a > 0 && b >= 0\n ensures gcd_func(a, b) > 0\n ensures gcd_func(a, b) <= a\n e...
{ "index": 89, "split": "test" }
method numberOfWays_3183(n: int) returns (result: int) { var mod := 1000000007; var coins := [1, 2, 6]; var f := new int[n + 1]; var i := 0; while i <= n invariant 0 <= i <= n + 1 invariant forall k :: 0 <= k < i ==> f[k] == 0 { f[i] := 0; i := i + 1; } f[0] := 1; var coinIdx := 0; w...
method numberOfWays_3183(n: int) returns (result: int) requires 1 <= n <= 100000 ensures 1 <= result <= 1000000007 { var mod := 1000000007; var coins := [1, 2, 6]; var f := new int[n + 1]; var i := 0; while i <= n invariant 0 <= i <= n + 1 invariant forall k :: 0 <= k < i ==> f[k] == 0 { f[i...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
90
900,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method numberOfWays_3183(n: int) returns (result: int)\n requires 1 <= n <= 100000\n ensures 1 <= result <= 1000000007\n{\n var mod := 1000000007;\n var coins := [1, 2, 6];\n var f := new int[n + 1];\n var i := 0;\n while i <= n\n invariant 0 <= i <= n + 1\n invar...
{ "index": 90, "split": "test" }
function gcd_func(a: int, b: int): int { if b == 0 then a else gcd_func(b, a % b) } lemma mod_properties(a: int, b: int) { } method gcd(a: int, b: int) returns (result: int) { var x := a; var y := b; while y != 0 invariant x > 0 && y >= 0 invariant gcd_func(a, b) == gcd_func(x, y) decreases y { ...
function gcd_func(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd_func(b, a % b) } lemma mod_properties(a: int, b: int) requires a > 0 && b > 0 ensures b % a >= 0 ensures a % b >= 0 ensures b % a < a ensures a % b < b ensures b % a == 0 || (b % a > 0 && b % a < ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
91
910,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd_func(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a\n else gcd_func(b, a % b)\n}\nlemma mod_properties(a: int, b: int)\n requires a > 0 && b > 0\n ensures b % a >= 0\n ensures a % b >= 0\n ensures b % a < a\n ensures a...
{ "index": 91, "split": "test" }
method monotoneIncreasingDigits_738(n: int) returns (result: int) { if n == 0 { result := 1; return; } var s := intToDigits(n); var i := 1; while i < |s| && s[i-1] <= s[i] invariant 1 <= i <= |s| invariant forall k :: 0 <= k < i-1 ==> s[k] <= s[k+1] { i := i + 1; } if i < |s| { w...
method monotoneIncreasingDigits_738(n: int) returns (result: int) requires 0 <= n <= 1000000000 ensures 1 <= result <= 2147483648 { if n == 0 { result := 1; return; } var s := intToDigits(n); var i := 1; while i < |s| && s[i-1] <= s[i] invariant 1 <= i <= |s| invariant forall k :: 0 <= k <...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
92
920,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method monotoneIncreasingDigits_738(n: int) returns (result: int)\n requires 0 <= n <= 1000000000\n ensures 1 <= result <= 2147483648\n{\n if n == 0 {\n result := 1;\n return;\n }\n var s := intToDigits(n);\n var i := 1;\n while i < |s| && s[i-1] <= s[i]\n inva...
{ "index": 92, "split": "test" }
method numberOfWays_3183(n: int) returns (result: int) { var mod := 1000000007; var f := new int[n + 1]; var i := 0; while i <= n invariant 0 <= i <= n + 1 invariant forall k :: 0 <= k < i ==> f[k] == 0 { f[i] := 0; i := i + 1; } f[0] := 1; var j := 1; ...
method numberOfWays_3183(n: int) returns (result: int) requires 1 <= n <= 100000 ensures 1 <= result <= 1000000007 { var mod := 1000000007; var f := new int[n + 1]; var i := 0; while i <= n invariant 0 <= i <= n + 1 invariant forall k :: 0 <= k < i ==> f[k] == 0 { f[i...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
93
930,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method numberOfWays_3183(n: int) returns (result: int)\n requires 1 <= n <= 100000\n ensures 1 <= result <= 1000000007\n{\n var mod := 1000000007;\n var f := new int[n + 1];\n var i := 0;\n while i <= n\n invariant 0 <= i <= n + 1\n invariant fo...
{ "index": 93, "split": "test" }
method countTriples_1925(n: int) returns (ans: int) { ans := 0; var a := 1; while a < n invariant 1 <= a <= n invariant ans >= 0 { var b := 1; while b < n invariant 1 <= b <= n invariant ans >= 0 { var x := a * a + b * b; ...
method countTriples_1925(n: int) returns (ans: int) requires 1 <= n <= 250 ensures ans >= 0 { ans := 0; var a := 1; while a < n invariant 1 <= a <= n invariant ans >= 0 { var b := 1; while b < n invariant 1 <= b <= n invariant ans >= 0 ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
94
940,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method countTriples_1925(n: int) returns (ans: int)\n requires 1 <= n <= 250\n ensures ans >= 0\n{\n ans := 0;\n var a := 1;\n while a < n\n invariant 1 <= a <= n\n invariant ans >= 0\n {\n var b := 1;\n while b < n\n in...
{ "index": 94, "split": "test" }
method maxDiff_1432(num: int) returns (result: int) { var numStr := IntToString(num); var a := numStr; var b := numStr; var i := 0; while i < |a| invariant 0 <= i <= |a| invariant forall j :: 0 <= j < |a| ==> a[j] in "0123456789" { if a[i] != '9' { a := Replac...
method maxDiff_1432(num: int) returns (result: int) requires 1 <= num <= 100000000 ensures 1 <= result <= 2147483648 { var numStr := IntToString(num); var a := numStr; var b := numStr; var i := 0; while i < |a| invariant 0 <= i <= |a| invariant forall j :: 0 <= j < |a| ==> a[...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
95
950,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method maxDiff_1432(num: int) returns (result: int)\n requires 1 <= num <= 100000000\n ensures 1 <= result <= 2147483648\n{\n var numStr := IntToString(num);\n var a := numStr;\n var b := numStr;\n var i := 0;\n while i < |a|\n invariant 0 <= i <= |...
{ "index": 95, "split": "test" }
method gcd(a: int, b: int) returns (result: int) { var x := a; var y := b; while y != 0 invariant x > 0 && y >= 0 invariant gcd_func(a, b) == gcd_func(x, y) decreases y { var temp := y; y := x % y; x := temp; } result := x; } function gcd_func(a: i...
method gcd(a: int, b: int) returns (result: int) requires a > 0 && b > 0 ensures result > 0 ensures result <= a && result <= b { var x := a; var y := b; while y != 0 invariant x > 0 && y >= 0 invariant gcd_func(a, b) == gcd_func(x, y) decreases y { var temp :=...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
96
960,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method gcd(a: int, b: int) returns (result: int)\n requires a > 0 && b > 0\n ensures result > 0\n ensures result <= a && result <= b\n{\n var x := a;\n var y := b;\n while y != 0\n invariant x > 0 && y >= 0\n invariant gcd_func(a, b) == gcd_func...
{ "index": 96, "split": "test" }
method smallestNumber_2165(num: int) returns (result: int) { var neg := num < 0; var n := if num < 0 then -num else num; var cnt := new int[10]; var i := 0; while i < 10 invariant 0 <= i <= 10 invariant forall k :: 0 <= k < i ==> cnt[k] == 0 { cnt[i] := 0; i := i ...
method smallestNumber_2165(num: int) returns (result: int) requires -1000000000000000 <= num <= 1000000000000000 ensures 0 <= result <= 1000000000000000 { var neg := num < 0; var n := if num < 0 then -num else num; var cnt := new int[10]; var i := 0; while i < 10 invariant 0 <= i <= ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
97
970,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestNumber_2165(num: int) returns (result: int)\n requires -1000000000000000 <= num <= 1000000000000000\n ensures 0 <= result <= 1000000000000000\n{\n var neg := num < 0;\n var n := if num < 0 then -num else num;\n var cnt := new int[10];\n var i :...
{ "index": 97, "split": "test" }
function gcd_func(a: int, b: int): int { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) { var x := a; var y := b; while y != 0 invariant x > 0 && y >= 0 invariant gcd_func(a, b) == gcd_func(x, y) decreases y { var temp := y...
function gcd_func(a: int, b: int): int requires a > 0 && b >= 0 decreases b { if b == 0 then a else gcd_func(b, a % b) } method gcd(a: int, b: int) returns (result: int) requires a > 0 && b > 0 ensures result > 0 ensures result == gcd_func(a, b) { var x := a; var y := b; while y != 0...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
98
980,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "function gcd_func(a: int, b: int): int\n requires a > 0 && b >= 0\n decreases b\n{\n if b == 0 then a else gcd_func(b, a % b)\n}\nmethod gcd(a: int, b: int) returns (result: int)\n requires a > 0 && b > 0\n ensures result > 0\n ensures result == gcd_func(a, b...
{ "index": 98, "split": "test" }
method smallestValue_2507(n: int) returns (result: int) { var current := n; while true decreases * { var t := current; var s := 0; var i := 2; var temp := current; while i * i <= temp && temp > 1 invariant i >= 2 invariant s >= 0 ...
method smallestValue_2507(n: int) returns (result: int) requires 2 <= n <= 100000 ensures 1 <= result <= 1000000000 decreases * { var current := n; while true decreases * { var t := current; var s := 0; var i := 2; var temp := current; while i * i ...
{ "dafny_response": { "dafny_response": "", "status": "" }, "llm_response": "" }
not_started
99
990,000
dataset8k_pure_remove
[ { "content": "<|im_start|>system\nYou are an expert in Dafny. You will be given tasks dealing with Dafny programs including precise annotations. You should only return code body in all circumstances. No text is allowed.\n<|im_end|>\n<|im_start|>user\nGiven a Dafny program with function signature, preconditions,...
code
{ "ground_truth": { "ground_truth": "method smallestValue_2507(n: int) returns (result: int)\n requires 2 <= n <= 100000\n ensures 1 <= result <= 1000000000\n decreases *\n{\n var current := n;\n while true\n decreases *\n {\n var t := current;\n var s := 0;\n var i :...
{ "index": 99, "split": "test" }