leo/unused/tests/parser/serialize/silly_sudoku.leo.out
2022-02-08 13:18:48 -05:00

529 lines
28 KiB
Plaintext

---
namespace: Serialize
expectation: Pass
outputs:
- name: ""
expected_input: []
import_statements:
- package_or_packages:
Package:
name: "{\"name\":\"lib\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import lib.SillySudoku;\\\"}\"}"
access:
Symbol:
symbol: "{\"name\":\"SillySudoku\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import lib.SillySudoku;\\\"}\"}"
alias: ~
imports: {}
aliases: {}
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}":
annotations: {}
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
- Variable:
identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":37,\\\"col_stop\\\":43,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
const_: false
output: Boolean
core_mapping: ~
block:
statements:
- Console:
function:
Log:
string:
- Scalar: 83
- Scalar: 116
- Scalar: 97
- Scalar: 114
- Scalar: 116
- Scalar: 105
- Scalar: 110
- Scalar: 103
- Scalar: 32
- Scalar: 83
- Scalar: 117
- Scalar: 100
- Scalar: 111
- Scalar: 107
- Scalar: 117
- Scalar: 32
- Scalar: 115
- Scalar: 111
- Scalar: 108
- Scalar: 118
- Scalar: 101
- Scalar: 114
- Scalar: 46
- Scalar: 46
- Scalar: 46
parameters: []
- Console:
function:
Log:
string:
- Scalar: 123
- Scalar: 125
parameters:
- Identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", puzzle);\\\"}\"}"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"sudoku\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"SillySudoku\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":18,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
members:
- identifier: "{\"name\":\"puzzle_grid\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":32,\\\"col_stop\\\":43,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
expression:
Identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":45,\\\"col_stop\\\":51,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
- Console:
function:
Log:
string:
- Scalar: 67
- Scalar: 104
- Scalar: 101
- Scalar: 99
- Scalar: 107
- Scalar: 105
- Scalar: 110
- Scalar: 103
- Scalar: 32
- Scalar: 83
- Scalar: 117
- Scalar: 100
- Scalar: 111
- Scalar: 107
- Scalar: 117
- Scalar: 32
- Scalar: 97
- Scalar: 110
- Scalar: 115
- Scalar: 119
- Scalar: 101
- Scalar: 114
- Scalar: 46
- Scalar: 46
- Scalar: 46
parameters: []
- Console:
function:
Log:
string:
- Scalar: 123
- Scalar: 125
parameters:
- Identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", answer);\\\"}\"}"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}"
type_: ~
value:
Call:
function:
Access:
Member:
inner:
Identifier: "{\"name\":\"sudoku\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":18,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}"
name: "{\"name\":\"solve\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":25,\\\"col_stop\\\":30,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}"
type_: ~
arguments:
- Identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}"
- Console:
function:
Log:
string:
- Scalar: 84
- Scalar: 104
- Scalar: 101
- Scalar: 32
- Scalar: 97
- Scalar: 110
- Scalar: 115
- Scalar: 119
- Scalar: 101
- Scalar: 114
- Scalar: 32
- Scalar: 105
- Scalar: 115
- Scalar: 32
- Scalar: 123
- Scalar: 125
- Scalar: 46
parameters:
- Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":38,\\\"col_stop\\\":44,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.log(\\\\\\\"The answer is {}.\\\\\\\", result);\\\"}\"}"
- Return:
expression:
Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":12,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return result;\\\"}\"}"
"{\"name\":\"test_solve_pass\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_solve_pass() {\\\"}\"}":
annotations:
test:
arguments: []
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test\\\"}\"}"
identifier: "{\"name\":\"test_solve_pass\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_solve_pass() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let puzzle: [u8; (3, 3)] = [[0, 2, 0],\\\"}\"}"
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "2"
- Expression:
Value:
Implicit: "0"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "6"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "8"
- Expression:
Value:
Implicit: "9"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let answer: [u8; (3, 3)] = [[1, 2, 3],\\\"}\"}"
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "1"
- Expression:
Value:
Implicit: "2"
- Expression:
Value:
Implicit: "3"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "4"
- Expression:
Value:
Implicit: "5"
- Expression:
Value:
Implicit: "6"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "7"
- Expression:
Value:
Implicit: "8"
- Expression:
Value:
Implicit: "9"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
- Identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
- Console:
function:
Assert:
Binary:
left:
Value:
Boolean: "true"
right:
Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":28,\\\"col_stop\\\":34,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(true == result);\\\"}\"}"
op: Eq
"{\"name\":\"test_solve_fail\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_solve_fail() {\\\"}\"}":
annotations:
test:
arguments: []
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test\\\"}\"}"
identifier: "{\"name\":\"test_solve_fail\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_solve_fail() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":45,\\\"line_stop\\\":45,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let puzzle: [u8; (3, 3)] = [[0, 2, 0],\\\"}\"}"
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "2"
- Expression:
Value:
Implicit: "0"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "6"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "8"
- Expression:
Value:
Implicit: "0"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":49,\\\"line_stop\\\":49,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let answer: [u8; (3, 3)] = [[1, 2, 3],\\\"}\"}"
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "1"
- Expression:
Value:
Implicit: "2"
- Expression:
Value:
Implicit: "3"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "4"
- Expression:
Value:
Implicit: "5"
- Expression:
Value:
Implicit: "6"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "7"
- Expression:
Value:
Implicit: "8"
- Expression:
Value:
Implicit: "8"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
- Identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
- Console:
function:
Assert:
Binary:
left:
Value:
Boolean: "false"
right:
Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":29,\\\"col_stop\\\":35,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(false == result);\\\"}\"}"
op: Eq
"{\"name\":\"test_solve_with_input\",\"span\":\"{\\\"line_start\\\":62,\\\"line_stop\\\":62,\\\"col_start\\\":10,\\\"col_stop\\\":31,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_solve_with_input(\\\"}\"}":
annotations:
test:
arguments:
- test_input
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test(test_input)\\\"}\"}"
identifier: "{\"name\":\"test_solve_with_input\",\"span\":\"{\\\"line_start\\\":62,\\\"line_stop\\\":62,\\\"col_start\\\":10,\\\"col_stop\\\":31,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_solve_with_input(\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" puzzle: [u8; (3, 3)],\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
- Variable:
identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":64,\\\"line_stop\\\":64,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" answer: [u8; (3, 3)],\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
- Variable:
identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":5,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" expected: bool\\\"}\"}"
const_: false
mutable: true
type_: Boolean
const_: false
output: ~
core_mapping: ~
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
- Identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
- Console:
function:
Log:
string:
- Scalar: 101
- Scalar: 120
- Scalar: 112
- Scalar: 101
- Scalar: 99
- Scalar: 116
- Scalar: 101
- Scalar: 100
- Scalar: 32
- Scalar: 123
- Scalar: 125
- Scalar: 44
- Scalar: 32
- Scalar: 103
- Scalar: 111
- Scalar: 116
- Scalar: 32
- Scalar: 123
- Scalar: 125
parameters:
- Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":40,\\\"col_stop\\\":48,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.log(\\\\\\\"expected {}, got {}\\\\\\\", expected, result);\\\"}\"}"
- Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":50,\\\"col_stop\\\":56,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.log(\\\\\\\"expected {}, got {}\\\\\\\", expected, result);\\\"}\"}"
- Console:
function:
Assert:
Binary:
left:
Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":72,\\\"line_stop\\\":72,\\\"col_start\\\":20,\\\"col_stop\\\":28,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(expected == result);\\\"}\"}"
right:
Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":72,\\\"line_stop\\\":72,\\\"col_start\\\":32,\\\"col_stop\\\":38,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(expected == result);\\\"}\"}"
op: Eq