Add theorem generations to tests

This commit is contained in:
gluaxspeed 2021-07-12 11:45:51 -07:00
parent a04a76305d
commit 650a729763
301 changed files with 144385 additions and 7 deletions

View File

@ -118,6 +118,11 @@ impl Ast {
let ast: Program = serde_json::from_str(json)?;
Ok(Self { ast })
}
pub fn from_json_file(path: std::path::PathBuf) -> Result<Self, AstError> {
let data = std::fs::read_to_string(path)?;
Self::from_json_string(&data)
}
}
impl AsRef<Program> for Ast {

View File

@ -17,6 +17,7 @@
use std::path::{Path, PathBuf};
use leo_asg::*;
use leo_ast::{Ast, Program};
use leo_synthesizer::{CircuitSynthesizer, SerializedCircuit, SummarizedCircuit};
use leo_test_framework::{
runner::{Namespace, ParseType, Runner},
@ -25,7 +26,13 @@ use leo_test_framework::{
use serde_yaml::Value;
use snarkvm_curves::{bls12_377::Bls12_377, edwards_bls12::Fq};
use leo_compiler::{compiler::Compiler, errors::CompilerError, targets::edwards_bls12::EdwardsGroupType, Output};
use leo_compiler::{
compiler::Compiler,
errors::CompilerError,
targets::edwards_bls12::EdwardsGroupType,
Output,
TheoremOptions,
};
pub type EdwardsTestCompiler = Compiler<'static, Fq, EdwardsGroupType>;
// pub type EdwardsConstrainedValue = ConstrainedValue<'static, Fq, EdwardsGroupType>;
@ -36,15 +43,26 @@ pub(crate) fn make_test_context() -> AsgContext<'static> {
new_context(allocator)
}
fn new_compiler(path: PathBuf) -> EdwardsTestCompiler {
fn new_compiler(path: PathBuf, theorem_options: Option<TheoremOptions>) -> EdwardsTestCompiler {
let program_name = "test".to_string();
let output_dir = PathBuf::from("/output/");
let output_dir = PathBuf::from("/tmp/output/");
std::fs::create_dir_all(output_dir.clone()).unwrap();
EdwardsTestCompiler::new(program_name, path, output_dir, make_test_context(), None, None)
EdwardsTestCompiler::new(
program_name,
path,
output_dir,
make_test_context(),
None,
theorem_options,
)
}
pub(crate) fn parse_program(program_string: &str) -> Result<EdwardsTestCompiler, CompilerError> {
let mut compiler = new_compiler("compiler-test".into());
pub(crate) fn parse_program(
program_string: &str,
theorem_options: Option<TheoremOptions>,
) -> Result<EdwardsTestCompiler, CompilerError> {
let mut compiler = new_compiler("compiler-test".into(), theorem_options);
compiler.parse_program_from_string(program_string)?;
@ -63,6 +81,9 @@ struct OutputItem {
struct CompileOutput {
pub circuit: SummarizedCircuit,
pub output: Vec<OutputItem>,
pub initial_theorem: Program,
pub canonicalized_theorem: Program,
pub type_inferenced_theorem: Program,
}
impl Namespace for CompileNamespace {
@ -85,7 +106,15 @@ impl Namespace for CompileNamespace {
// })
// .unwrap_or(test.path.clone());
let parsed = parse_program(&test.content).map_err(|x| x.to_string())?;
let parsed = parse_program(
&test.content,
Some(TheoremOptions {
initial: true,
canonicalized: true,
type_inferenced: true,
}),
)
.map_err(|x| x.to_string())?;
// (name, content)
let mut inputs = vec![];
@ -169,15 +198,33 @@ impl Namespace for CompileNamespace {
} else {
last_circuit = Some(circuit);
}
output_items.push(OutputItem {
input_file: input.0,
output,
});
}
let initial_theorem: Program = Ast::from_json_file("/tmp/output/initial_ast.json".into())
.unwrap_or(Ast::new(Program::new("Error reading initial theorem.".to_string())))
.into_repr();
let canonicalized_theorem: Program = Ast::from_json_file("/tmp/output/canonicalization_ast.json".into())
.unwrap_or(Ast::new(Program::new(
"Error reading canonicalized theorem.".to_string(),
)))
.into_repr();
let type_inferenced_theorem: Program = Ast::from_json_file("/tmp/output/type_inferenced_ast.json".into())
.unwrap_or(Ast::new(Program::new(
"Error reading type inferenced theorem.".to_string(),
)))
.into_repr();
let final_output = CompileOutput {
circuit: last_circuit.unwrap(),
output: output_items,
initial_theorem,
canonicalized_theorem,
type_inferenced_theorem,
};
Ok(serde_yaml::to_value(&final_output).expect("serialization failed"))
}

View File

@ -22,3 +22,279 @@ outputs:
a:
type: bool
value: "false"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Address
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: address) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 17
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
type_: ~
value:
Value:
Address:
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
- line_start: 4
line_stop: 4
col_start: 20
col_stop: 83
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 83
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender;\\\"}\"}"
right:
Identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender;\\\"}\"}"
op: Eq
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 23
path: compiler-test
content: " return x == sender;"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 23
path: compiler-test
content: " return x == sender;"
span:
line_start: 3
line_stop: 7
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(x: address) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 7
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: address) -> bool {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Address
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: address) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 17
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
type_: ~
value:
Value:
Address:
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
- line_start: 4
line_stop: 4
col_start: 20
col_stop: 83
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 83
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender;\\\"}\"}"
right:
Identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender;\\\"}\"}"
op: Eq
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 23
path: compiler-test
content: " return x == sender;"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 23
path: compiler-test
content: " return x == sender;"
span:
line_start: 3
line_stop: 7
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(x: address) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 7
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: address) -> bool {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Address
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: address) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 17
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
type_: Address
value:
Value:
Address:
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
- line_start: 4
line_stop: 4
col_start: 20
col_stop: 83
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 83
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender;\\\"}\"}"
right:
Identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender;\\\"}\"}"
op: Eq
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 23
path: compiler-test
content: " return x == sender;"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 23
path: compiler-test
content: " return x == sender;"
span:
line_start: 3
line_stop: 7
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(x: address) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 7
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: address) -> bool {\n...\n}\n\n"

View File

@ -22,3 +22,480 @@ outputs:
a:
type: bool
value: "false"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Address
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: address) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 17
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
type_: ~
value:
Value:
Address:
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
- line_start: 4
line_stop: 4
col_start: 20
col_stop: 83
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 83
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"receiver\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const receiver = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 19
path: compiler-test
content: " const receiver = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;"
type_: ~
value:
Value:
Address:
- aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r
- line_start: 5
line_stop: 5
col_start: 22
col_stop: 85
path: compiler-test
content: " const receiver = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 85
path: compiler-test
content: " const receiver = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;"
- Return:
expression:
Ternary:
condition:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
right:
Identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 23
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
if_true:
Binary:
left:
Identifier: "{\"name\":\"receiver\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
right:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 26
col_stop: 39
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
if_false:
Binary:
left:
Identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":42,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
right:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":52,\\\"col_stop\\\":53,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 42
col_stop: 53
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 53
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 53
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
span:
line_start: 3
line_stop: 8
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(x: address) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: address) -> bool {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Address
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: address) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 17
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
type_: ~
value:
Value:
Address:
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
- line_start: 4
line_stop: 4
col_start: 20
col_stop: 83
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 83
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"receiver\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const receiver = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 19
path: compiler-test
content: " const receiver = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;"
type_: ~
value:
Value:
Address:
- aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r
- line_start: 5
line_stop: 5
col_start: 22
col_stop: 85
path: compiler-test
content: " const receiver = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 85
path: compiler-test
content: " const receiver = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;"
- Return:
expression:
Ternary:
condition:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
right:
Identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 23
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
if_true:
Binary:
left:
Identifier: "{\"name\":\"receiver\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
right:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 26
col_stop: 39
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
if_false:
Binary:
left:
Identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":42,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
right:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":52,\\\"col_stop\\\":53,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 42
col_stop: 53
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 53
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 53
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
span:
line_start: 3
line_stop: 8
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(x: address) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: address) -> bool {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: address) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Address
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: address) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 17
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
type_: Address
value:
Value:
Address:
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
- line_start: 4
line_stop: 4
col_start: 20
col_stop: 83
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 83
path: compiler-test
content: " const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"receiver\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const receiver = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 19
path: compiler-test
content: " const receiver = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;"
type_: Address
value:
Value:
Address:
- aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r
- line_start: 5
line_stop: 5
col_start: 22
col_stop: 85
path: compiler-test
content: " const receiver = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 85
path: compiler-test
content: " const receiver = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;"
- Return:
expression:
Ternary:
condition:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
right:
Identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 23
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
if_true:
Binary:
left:
Identifier: "{\"name\":\"receiver\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
right:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 26
col_stop: 39
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
if_false:
Binary:
left:
Identifier: "{\"name\":\"sender\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":42,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
right:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":52,\\\"col_stop\\\":53,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x == sender ? receiver == x : sender == x;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 42
col_stop: 53
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 53
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 53
path: compiler-test
content: " return x == sender ? receiver == x : sender == x;"
span:
line_start: 3
line_stop: 8
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(x: address) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: address) -> bool {\n...\n}\n\n\n"

View File

@ -22,3 +22,286 @@ outputs:
x:
type: bool
value: "false"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "2"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == [0u8; (3, 2)];\\\"}\"}"
right:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 18
col_stop: 21
path: compiler-test
content: " return a == [0u8; (3, 2)];"
dimensions:
- value: "3"
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == [0u8; (3, 2)];\\\"}\"}"
right:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 18
col_stop: 21
path: compiler-test
content: " return a == [0u8; (3, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
dimensions:
- value: "3"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == [0u8; (3, 2)];\\\"}\"}"
right:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 18
col_stop: 21
path: compiler-test
content: " return a == [0u8; (3, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
dimensions:
- value: "3"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"

View File

@ -22,3 +22,505 @@ outputs:
x:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "2"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == [[1u8, 2], [3, 4], [5, 6]];\\\"}\"}"
right:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 22
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
Value:
Implicit:
- "2"
- line_start: 4
line_stop: 4
col_start: 24
col_stop: 25
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 26
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit:
- "3"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 30
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
Value:
Implicit:
- "4"
- line_start: 4
line_stop: 4
col_start: 32
col_stop: 33
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 34
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit:
- "5"
- line_start: 4
line_stop: 4
col_start: 37
col_stop: 38
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
Value:
Implicit:
- "6"
- line_start: 4
line_stop: 4
col_start: 40
col_stop: 41
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 36
col_stop: 42
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 43
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 43
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 43
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == [[1u8, 2], [3, 4], [5, 6]];\\\"}\"}"
right:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 22
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
Value:
Implicit:
- "2"
- line_start: 4
line_stop: 4
col_start: 24
col_stop: 25
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 26
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit:
- "3"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 30
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
Value:
Implicit:
- "4"
- line_start: 4
line_stop: 4
col_start: 32
col_stop: 33
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 34
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit:
- "5"
- line_start: 4
line_stop: 4
col_start: 37
col_stop: 38
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
Value:
Implicit:
- "6"
- line_start: 4
line_stop: 4
col_start: 40
col_stop: 41
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 36
col_stop: 42
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 43
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 43
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 43
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == [[1u8, 2], [3, 4], [5, 6]];\\\"}\"}"
right:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 22
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
Value:
Integer:
- U8
- "2"
- line_start: 4
line_stop: 4
col_start: 24
col_stop: 25
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 26
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "3"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 30
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
Value:
Integer:
- U8
- "4"
- line_start: 4
line_stop: 4
col_start: 32
col_stop: 33
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 34
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "5"
- line_start: 4
line_stop: 4
col_start: 37
col_stop: 38
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
- Expression:
Value:
Integer:
- U8
- "6"
- line_start: 4
line_stop: 4
col_start: 40
col_stop: 41
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 36
col_stop: 42
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 43
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 43
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 43
path: compiler-test
content: " return a == [[1u8, 2], [3, 4], [5, 6]];"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"

View File

@ -16,3 +16,296 @@ outputs:
x:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "2"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == [[0u8; 2]; 3];\\\"}\"}"
right:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 22
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 26
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
dimensions:
- value: "3"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 30
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == [[0u8; 2]; 3];\\\"}\"}"
right:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 22
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 26
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
dimensions:
- value: "3"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 30
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == [[0u8; 2]; 3];\\\"}\"}"
right:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 22
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 26
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
dimensions:
- value: "3"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 30
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " return a == [[0u8; 2]; 3];"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"

View File

@ -16,3 +16,286 @@ outputs:
x:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "2"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == [0u8; (3, 2)];\\\"}\"}"
right:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 18
col_stop: 21
path: compiler-test
content: " return a == [0u8; (3, 2)];"
dimensions:
- value: "3"
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == [0u8; (3, 2)];\\\"}\"}"
right:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 18
col_stop: 21
path: compiler-test
content: " return a == [0u8; (3, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
dimensions:
- value: "3"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; (3, 2)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == [0u8; (3, 2)];\\\"}\"}"
right:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 18
col_stop: 21
path: compiler-test
content: " return a == [0u8; (3, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
dimensions:
- value: "3"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " return a == [0u8; (3, 2)];"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; (3, 2)]) -> bool {\n...\n}"

View File

@ -16,3 +16,627 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
type_:
Array:
- IntegerType: U8
- - value: "2"
- value: "2"
- value: "2"
value:
ArrayInit:
element:
Value:
Integer:
- U8
- "1"
- line_start: 4
line_stop: 4
col_start: 33
col_stop: 36
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
dimensions:
- value: "2"
- value: "2"
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 32
col_stop: 48
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 48
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
type_:
Array:
- IntegerType: U8
- - value: "2"
- value: "2"
- value: "2"
value:
ArrayInit:
element:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 35
col_stop: 38
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 34
col_stop: 42
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 33
col_stop: 46
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 32
col_stop: 50
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 50
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 3
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
type_:
Array:
- Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "2"
- - value: "2"
value:
ArrayInit:
element:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "1"
- line_start: 4
line_stop: 4
col_start: 33
col_stop: 36
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 32
col_stop: 48
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 32
col_stop: 48
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 32
col_stop: 48
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 48
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
type_:
Array:
- Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "2"
- - value: "2"
value:
ArrayInit:
element:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 35
col_stop: 38
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 34
col_stop: 42
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 33
col_stop: 46
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 32
col_stop: 50
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 50
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 3
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
type_:
Array:
- Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "2"
- - value: "2"
value:
ArrayInit:
element:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "1"
- line_start: 4
line_stop: 4
col_start: 33
col_stop: 36
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 32
col_stop: 48
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 32
col_stop: 48
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 32
col_stop: 48
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 48
path: compiler-test
content: " const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
type_:
Array:
- Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "2"
- - value: "2"
value:
ArrayInit:
element:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 35
col_stop: 38
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 34
col_stop: 42
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 33
col_stop: 46
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 32
col_stop: 50
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 50
path: compiler-test
content: " const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2];"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 3
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"

View File

@ -16,3 +16,522 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(n: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(n: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"n\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(n: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(n: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const x = [false; (2, 2)];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const x = [false; (2, 2)];"
type_: ~
value:
ArrayInit:
element:
Value:
Boolean:
- "false"
- line_start: 4
line_stop: 4
col_start: 16
col_stop: 21
path: compiler-test
content: " const x = [false; (2, 2)];"
dimensions:
- value: "2"
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 30
path: compiler-test
content: " const x = [false; (2, 2)];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " const x = [false; (2, 2)];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const z: bool = x[0][0];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const z: bool = x[0][0];"
type_: Boolean
value:
ArrayAccess:
array:
ArrayAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const z: bool = x[0][0];\\\"}\"}"
index:
Value:
Implicit:
- "0"
- line_start: 5
line_stop: 5
col_start: 23
col_stop: 24
path: compiler-test
content: " const z: bool = x[0][0];"
span:
line_start: 5
line_stop: 5
col_start: 21
col_stop: 25
path: compiler-test
content: " const z: bool = x[0][0];"
index:
Value:
Implicit:
- "0"
- line_start: 5
line_stop: 5
col_start: 26
col_stop: 27
path: compiler-test
content: " const z: bool = x[0][0];"
span:
line_start: 5
line_stop: 5
col_start: 21
col_stop: 28
path: compiler-test
content: " const z: bool = x[0][0];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 28
path: compiler-test
content: " const z: bool = x[0][0];"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"n\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return n == z;\\\"}\"}"
right:
Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return n == z;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 18
path: compiler-test
content: " return n == z;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 18
path: compiler-test
content: " return n == z;"
span:
line_start: 3
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(n: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(n: bool) -> bool {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(n: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(n: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"n\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(n: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(n: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const x = [false; (2, 2)];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const x = [false; (2, 2)];"
type_: ~
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Boolean:
- "false"
- line_start: 4
line_stop: 4
col_start: 16
col_stop: 21
path: compiler-test
content: " const x = [false; (2, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 30
path: compiler-test
content: " const x = [false; (2, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 30
path: compiler-test
content: " const x = [false; (2, 2)];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " const x = [false; (2, 2)];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const z: bool = x[0][0];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const z: bool = x[0][0];"
type_: Boolean
value:
ArrayAccess:
array:
ArrayAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const z: bool = x[0][0];\\\"}\"}"
index:
Value:
Implicit:
- "0"
- line_start: 5
line_stop: 5
col_start: 23
col_stop: 24
path: compiler-test
content: " const z: bool = x[0][0];"
span:
line_start: 5
line_stop: 5
col_start: 21
col_stop: 25
path: compiler-test
content: " const z: bool = x[0][0];"
index:
Value:
Implicit:
- "0"
- line_start: 5
line_stop: 5
col_start: 26
col_stop: 27
path: compiler-test
content: " const z: bool = x[0][0];"
span:
line_start: 5
line_stop: 5
col_start: 21
col_stop: 28
path: compiler-test
content: " const z: bool = x[0][0];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 28
path: compiler-test
content: " const z: bool = x[0][0];"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"n\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return n == z;\\\"}\"}"
right:
Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return n == z;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 18
path: compiler-test
content: " return n == z;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 18
path: compiler-test
content: " return n == z;"
span:
line_start: 3
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(n: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(n: bool) -> bool {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(n: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(n: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"n\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(n: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(n: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const x = [false; (2, 2)];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const x = [false; (2, 2)];"
type_:
Array:
- Array:
- Boolean
- - value: "2"
- - value: "2"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Boolean:
- "false"
- line_start: 4
line_stop: 4
col_start: 16
col_stop: 21
path: compiler-test
content: " const x = [false; (2, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 30
path: compiler-test
content: " const x = [false; (2, 2)];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 30
path: compiler-test
content: " const x = [false; (2, 2)];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " const x = [false; (2, 2)];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const z: bool = x[0][0];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const z: bool = x[0][0];"
type_: Boolean
value:
ArrayAccess:
array:
ArrayAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const z: bool = x[0][0];\\\"}\"}"
index:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 23
col_stop: 24
path: compiler-test
content: " const z: bool = x[0][0];"
span:
line_start: 5
line_stop: 5
col_start: 21
col_stop: 25
path: compiler-test
content: " const z: bool = x[0][0];"
index:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 26
col_stop: 27
path: compiler-test
content: " const z: bool = x[0][0];"
span:
line_start: 5
line_stop: 5
col_start: 21
col_stop: 28
path: compiler-test
content: " const z: bool = x[0][0];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 28
path: compiler-test
content: " const z: bool = x[0][0];"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"n\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return n == z;\\\"}\"}"
right:
Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return n == z;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 18
path: compiler-test
content: " return n == z;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 18
path: compiler-test
content: " return n == z;"
span:
line_start: 3
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(n: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(n: bool) -> bool {\n...\n}\n\n\n"

View File

@ -16,3 +16,779 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 23
col_stop: 27
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 16
col_stop: 28
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 31
col_stop: 35
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 37
col_stop: 41
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 30
col_stop: 42
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 45
col_stop: 49
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 51
col_stop: 55
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 44
col_stop: 56
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 57
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 57
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
type_:
Array:
- IntegerType: U32
- - value: "3"
- value: "2"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 32
col_stop: 33
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 31
col_stop: 37
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "3"
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 4
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 23
col_stop: 27
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 16
col_stop: 28
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 31
col_stop: 35
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 37
col_stop: 41
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 30
col_stop: 42
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 45
col_stop: 49
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 51
col_stop: 55
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 44
col_stop: 56
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 57
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 57
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
type_:
Array:
- Array:
- IntegerType: U32
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 32
col_stop: 33
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 31
col_stop: 37
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "3"
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 4
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
type_:
Array:
- Array:
- IntegerType: U32
- - value: "2"
- - value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 23
col_stop: 27
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 16
col_stop: 28
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 31
col_stop: 35
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 37
col_stop: 41
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 30
col_stop: 42
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 45
col_stop: 49
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 51
col_stop: 55
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 44
col_stop: 56
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 57
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 57
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
type_:
Array:
- Array:
- IntegerType: U32
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U32
- "0"
- line_start: 6
line_stop: 6
col_start: 32
col_stop: 33
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 31
col_stop: 37
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "3"
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 4
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"

View File

@ -22,3 +22,540 @@ outputs:
r:
type: "[u8; 3]"
value: "\"123\""
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> [u8; 3] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> [u8; 3] {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> [u8; 3] {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; 3]) -> [u8; 3] {"
output:
Array:
- IntegerType: U8
- - value: "3"
block:
statements:
- Return:
expression:
Ternary:
condition:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.r == a ? [3,2,1] : [1,2,3];\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.r == a ? [3,2,1] : [1,2,3];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 27
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
name: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.r == a ? [3,2,1] : [1,2,3];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 29
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
right:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.r == a ? [3,2,1] : [1,2,3];\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 34
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
if_true:
ArrayInline:
elements:
- Expression:
Value:
Implicit:
- "3"
- line_start: 4
line_stop: 4
col_start: 38
col_stop: 39
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
- Expression:
Value:
Implicit:
- "2"
- line_start: 4
line_stop: 4
col_start: 40
col_stop: 41
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
- Expression:
Value:
Implicit:
- "1"
- line_start: 4
line_stop: 4
col_start: 42
col_stop: 43
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 4
line_stop: 4
col_start: 37
col_stop: 44
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
if_false:
ArrayInline:
elements:
- Expression:
Value:
Implicit:
- "1"
- line_start: 4
line_stop: 4
col_start: 48
col_stop: 49
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
- Expression:
Value:
Implicit:
- "2"
- line_start: 4
line_stop: 4
col_start: 50
col_stop: 51
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
- Expression:
Value:
Implicit:
- "3"
- line_start: 4
line_stop: 4
col_start: 52
col_stop: 53
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 4
line_stop: 4
col_start: 47
col_stop: 54
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 54
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 54
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 3
line_stop: 5
col_start: 38
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> [u8; 3] {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> [u8; 3] {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> [u8; 3] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> [u8; 3] {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> [u8; 3] {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; 3]) -> [u8; 3] {"
output:
Array:
- IntegerType: U8
- - value: "3"
block:
statements:
- Return:
expression:
Ternary:
condition:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.r == a ? [3,2,1] : [1,2,3];\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.r == a ? [3,2,1] : [1,2,3];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 27
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
name: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.r == a ? [3,2,1] : [1,2,3];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 29
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
right:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.r == a ? [3,2,1] : [1,2,3];\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 34
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
if_true:
ArrayInline:
elements:
- Expression:
Value:
Implicit:
- "3"
- line_start: 4
line_stop: 4
col_start: 38
col_stop: 39
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
- Expression:
Value:
Implicit:
- "2"
- line_start: 4
line_stop: 4
col_start: 40
col_stop: 41
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
- Expression:
Value:
Implicit:
- "1"
- line_start: 4
line_stop: 4
col_start: 42
col_stop: 43
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 4
line_stop: 4
col_start: 37
col_stop: 44
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
if_false:
ArrayInline:
elements:
- Expression:
Value:
Implicit:
- "1"
- line_start: 4
line_stop: 4
col_start: 48
col_stop: 49
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
- Expression:
Value:
Implicit:
- "2"
- line_start: 4
line_stop: 4
col_start: 50
col_stop: 51
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
- Expression:
Value:
Implicit:
- "3"
- line_start: 4
line_stop: 4
col_start: 52
col_stop: 53
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 4
line_stop: 4
col_start: 47
col_stop: 54
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 54
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 54
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 3
line_stop: 5
col_start: 38
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> [u8; 3] {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> [u8; 3] {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> [u8; 3] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> [u8; 3] {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> [u8; 3] {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; 3]) -> [u8; 3] {"
output:
Array:
- IntegerType: U8
- - value: "3"
block:
statements:
- Return:
expression:
Ternary:
condition:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.r == a ? [3,2,1] : [1,2,3];\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.r == a ? [3,2,1] : [1,2,3];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 27
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
name: "{\"name\":\"r\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.r == a ? [3,2,1] : [1,2,3];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 29
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
right:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.r == a ? [3,2,1] : [1,2,3];\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 34
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
if_true:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "3"
- line_start: 4
line_stop: 4
col_start: 38
col_stop: 39
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
- Expression:
Value:
Integer:
- U8
- "2"
- line_start: 4
line_stop: 4
col_start: 40
col_stop: 41
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 4
line_stop: 4
col_start: 42
col_stop: 43
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 4
line_stop: 4
col_start: 37
col_stop: 44
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
if_false:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 4
line_stop: 4
col_start: 48
col_stop: 49
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
- Expression:
Value:
Integer:
- U8
- "2"
- line_start: 4
line_stop: 4
col_start: 50
col_stop: 51
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
- Expression:
Value:
Integer:
- U8
- "3"
- line_start: 4
line_stop: 4
col_start: 52
col_stop: 53
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 4
line_stop: 4
col_start: 47
col_stop: 54
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 54
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 54
path: compiler-test
content: " return input.registers.r == a ? [3,2,1] : [1,2,3];"
span:
line_start: 3
line_stop: 5
col_start: 38
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> [u8; 3] {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> [u8; 3] {\n...\n}"

View File

@ -16,3 +16,416 @@ outputs:
x:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = [1u8; 4];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = [1u8; 4];"
type_: ~
value:
ArrayInit:
element:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 16
col_stop: 19
path: compiler-test
content: " const b = [1u8; 4];"
dimensions:
- value: "4"
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 23
path: compiler-test
content: " const b = [1u8; 4];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 23
path: compiler-test
content: " const b = [1u8; 4];"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b[0..3];\\\"}\"}"
right:
ArrayRangeAccess:
array:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b[0..3];\\\"}\"}"
left:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 19
col_stop: 20
path: compiler-test
content: " return a == b[0..3];"
right:
Value:
Implicit:
- "3"
- line_start: 6
line_stop: 6
col_start: 22
col_stop: 23
path: compiler-test
content: " return a == b[0..3];"
span:
line_start: 6
line_stop: 6
col_start: 17
col_stop: 24
path: compiler-test
content: " return a == b[0..3];"
op: Eq
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 24
path: compiler-test
content: " return a == b[0..3];"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 24
path: compiler-test
content: " return a == b[0..3];"
span:
line_start: 4
line_stop: 7
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 7
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = [1u8; 4];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = [1u8; 4];"
type_: ~
value:
ArrayInit:
element:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 16
col_stop: 19
path: compiler-test
content: " const b = [1u8; 4];"
dimensions:
- value: "4"
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 23
path: compiler-test
content: " const b = [1u8; 4];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 23
path: compiler-test
content: " const b = [1u8; 4];"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b[0..3];\\\"}\"}"
right:
ArrayRangeAccess:
array:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b[0..3];\\\"}\"}"
left:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 19
col_stop: 20
path: compiler-test
content: " return a == b[0..3];"
right:
Value:
Implicit:
- "3"
- line_start: 6
line_stop: 6
col_start: 22
col_stop: 23
path: compiler-test
content: " return a == b[0..3];"
span:
line_start: 6
line_stop: 6
col_start: 17
col_stop: 24
path: compiler-test
content: " return a == b[0..3];"
op: Eq
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 24
path: compiler-test
content: " return a == b[0..3];"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 24
path: compiler-test
content: " return a == b[0..3];"
span:
line_start: 4
line_stop: 7
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 7
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = [1u8; 4];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = [1u8; 4];"
type_:
Array:
- IntegerType: U8
- - value: "4"
value:
ArrayInit:
element:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 16
col_stop: 19
path: compiler-test
content: " const b = [1u8; 4];"
dimensions:
- value: "4"
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 23
path: compiler-test
content: " const b = [1u8; 4];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 23
path: compiler-test
content: " const b = [1u8; 4];"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b[0..3];\\\"}\"}"
right:
ArrayRangeAccess:
array:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b[0..3];\\\"}\"}"
left:
Value:
Integer:
- U32
- "0"
- line_start: 6
line_stop: 6
col_start: 19
col_stop: 20
path: compiler-test
content: " return a == b[0..3];"
right:
Value:
Integer:
- U32
- "3"
- line_start: 6
line_stop: 6
col_start: 22
col_stop: 23
path: compiler-test
content: " return a == b[0..3];"
span:
line_start: 6
line_stop: 6
col_start: 17
col_stop: 24
path: compiler-test
content: " return a == b[0..3];"
op: Eq
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 24
path: compiler-test
content: " return a == b[0..3];"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 24
path: compiler-test
content: " return a == b[0..3];"
span:
line_start: 4
line_stop: 7
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 7
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {\n...\n}\n"

View File

@ -16,3 +16,894 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 14
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
type_:
Array:
- IntegerType: U32
- - value: "9"
value:
ArrayInline:
elements:
- Expression:
Value:
Implicit:
- "0"
- line_start: 4
line_stop: 4
col_start: 28
col_stop: 29
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "1"
- line_start: 4
line_stop: 4
col_start: 31
col_stop: 32
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "2"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 35
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "3"
- line_start: 4
line_stop: 4
col_start: 37
col_stop: 38
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "4"
- line_start: 4
line_stop: 4
col_start: 40
col_stop: 41
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "5"
- line_start: 4
line_stop: 4
col_start: 43
col_stop: 44
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "6"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 47
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "7"
- line_start: 4
line_stop: 4
col_start: 49
col_stop: 50
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "8"
- line_start: 4
line_stop: 4
col_start: 52
col_stop: 53
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
span:
line_start: 4
line_stop: 4
col_start: 27
col_stop: 54
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 54
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: [u32; 2] = [0, 1];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 19
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
type_:
Array:
- IntegerType: U32
- - value: "2"
value:
ArrayInline:
elements:
- Expression:
Value:
Implicit:
- "0"
- line_start: 5
line_stop: 5
col_start: 33
col_stop: 34
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
- Expression:
Value:
Implicit:
- "1"
- line_start: 5
line_stop: 5
col_start: 36
col_stop: 37
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
span:
line_start: 5
line_stop: 5
col_start: 32
col_stop: 38
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 38
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":11,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const actual = arr[..2]; // Should produce [0, 1]\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 11
col_stop: 17
path: compiler-test
content: " const actual = arr[..2]; // Should produce [0, 1]"
type_: ~
value:
ArrayRangeAccess:
array:
Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const actual = arr[..2]; // Should produce [0, 1]\\\"}\"}"
left: ~
right:
Value:
Implicit:
- "2"
- line_start: 7
line_stop: 7
col_start: 26
col_stop: 27
path: compiler-test
content: " const actual = arr[..2]; // Should produce [0, 1]"
span:
line_start: 7
line_stop: 7
col_start: 20
col_stop: 28
path: compiler-test
content: " const actual = arr[..2]; // Should produce [0, 1]"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 28
path: compiler-test
content: " const actual = arr[..2]; // Should produce [0, 1]"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected == actual == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":24,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected == actual == y;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 30
path: compiler-test
content: " return expected == actual == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected == actual == y;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 35
path: compiler-test
content: " return expected == actual == y;"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 35
path: compiler-test
content: " return expected == actual == y;"
span:
line_start: 3
line_stop: 10
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 10
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 14
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
type_:
Array:
- IntegerType: U32
- - value: "9"
value:
ArrayInline:
elements:
- Expression:
Value:
Implicit:
- "0"
- line_start: 4
line_stop: 4
col_start: 28
col_stop: 29
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "1"
- line_start: 4
line_stop: 4
col_start: 31
col_stop: 32
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "2"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 35
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "3"
- line_start: 4
line_stop: 4
col_start: 37
col_stop: 38
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "4"
- line_start: 4
line_stop: 4
col_start: 40
col_stop: 41
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "5"
- line_start: 4
line_stop: 4
col_start: 43
col_stop: 44
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "6"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 47
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "7"
- line_start: 4
line_stop: 4
col_start: 49
col_stop: 50
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Implicit:
- "8"
- line_start: 4
line_stop: 4
col_start: 52
col_stop: 53
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
span:
line_start: 4
line_stop: 4
col_start: 27
col_stop: 54
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 54
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: [u32; 2] = [0, 1];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 19
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
type_:
Array:
- IntegerType: U32
- - value: "2"
value:
ArrayInline:
elements:
- Expression:
Value:
Implicit:
- "0"
- line_start: 5
line_stop: 5
col_start: 33
col_stop: 34
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
- Expression:
Value:
Implicit:
- "1"
- line_start: 5
line_stop: 5
col_start: 36
col_stop: 37
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
span:
line_start: 5
line_stop: 5
col_start: 32
col_stop: 38
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 38
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":11,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const actual = arr[..2]; // Should produce [0, 1]\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 11
col_stop: 17
path: compiler-test
content: " const actual = arr[..2]; // Should produce [0, 1]"
type_: ~
value:
ArrayRangeAccess:
array:
Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const actual = arr[..2]; // Should produce [0, 1]\\\"}\"}"
left: ~
right:
Value:
Implicit:
- "2"
- line_start: 7
line_stop: 7
col_start: 26
col_stop: 27
path: compiler-test
content: " const actual = arr[..2]; // Should produce [0, 1]"
span:
line_start: 7
line_stop: 7
col_start: 20
col_stop: 28
path: compiler-test
content: " const actual = arr[..2]; // Should produce [0, 1]"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 28
path: compiler-test
content: " const actual = arr[..2]; // Should produce [0, 1]"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected == actual == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":24,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected == actual == y;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 30
path: compiler-test
content: " return expected == actual == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected == actual == y;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 35
path: compiler-test
content: " return expected == actual == y;"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 35
path: compiler-test
content: " return expected == actual == y;"
span:
line_start: 3
line_stop: 10
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 10
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 14
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
type_:
Array:
- IntegerType: U32
- - value: "9"
value:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 4
line_stop: 4
col_start: 28
col_stop: 29
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Integer:
- U32
- "1"
- line_start: 4
line_stop: 4
col_start: 31
col_stop: 32
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Integer:
- U32
- "2"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 35
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Integer:
- U32
- "3"
- line_start: 4
line_stop: 4
col_start: 37
col_stop: 38
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Integer:
- U32
- "4"
- line_start: 4
line_stop: 4
col_start: 40
col_stop: 41
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Integer:
- U32
- "5"
- line_start: 4
line_stop: 4
col_start: 43
col_stop: 44
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Integer:
- U32
- "6"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 47
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Integer:
- U32
- "7"
- line_start: 4
line_stop: 4
col_start: 49
col_stop: 50
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Expression:
Value:
Integer:
- U32
- "8"
- line_start: 4
line_stop: 4
col_start: 52
col_stop: 53
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
span:
line_start: 4
line_stop: 4
col_start: 27
col_stop: 54
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 54
path: compiler-test
content: " const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const expected: [u32; 2] = [0, 1];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 19
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
type_:
Array:
- IntegerType: U32
- - value: "2"
value:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 33
col_stop: 34
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
- Expression:
Value:
Integer:
- U32
- "1"
- line_start: 5
line_stop: 5
col_start: 36
col_stop: 37
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
span:
line_start: 5
line_stop: 5
col_start: 32
col_stop: 38
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 38
path: compiler-test
content: " const expected: [u32; 2] = [0, 1];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":11,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const actual = arr[..2]; // Should produce [0, 1]\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 11
col_stop: 17
path: compiler-test
content: " const actual = arr[..2]; // Should produce [0, 1]"
type_:
Array:
- IntegerType: U32
- - value: "2"
value:
ArrayRangeAccess:
array:
Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const actual = arr[..2]; // Should produce [0, 1]\\\"}\"}"
left: ~
right:
Value:
Integer:
- U32
- "2"
- line_start: 7
line_stop: 7
col_start: 26
col_stop: 27
path: compiler-test
content: " const actual = arr[..2]; // Should produce [0, 1]"
span:
line_start: 7
line_stop: 7
col_start: 20
col_stop: 28
path: compiler-test
content: " const actual = arr[..2]; // Should produce [0, 1]"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 28
path: compiler-test
content: " const actual = arr[..2]; // Should produce [0, 1]"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected == actual == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"actual\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":24,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected == actual == y;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 30
path: compiler-test
content: " return expected == actual == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return expected == actual == y;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 35
path: compiler-test
content: " return expected == actual == y;"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 35
path: compiler-test
content: " return expected == actual == y;"
span:
line_start: 3
line_stop: 10
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 10
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n"

View File

@ -16,3 +16,693 @@ outputs:
x:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = [1u8, 1u8];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = [1u8, 1u8];"
type_: ~
value:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 16
col_stop: 19
path: compiler-test
content: " const b = [1u8, 1u8];"
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 21
col_stop: 24
path: compiler-test
content: " const b = [1u8, 1u8];"
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 25
path: compiler-test
content: " const b = [1u8, 1u8];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 25
path: compiler-test
content: " const b = [1u8, 1u8];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const c = [1u8, ...b];\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const c = [1u8, ...b];"
type_: ~
value:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 6
line_stop: 6
col_start: 16
col_stop: 19
path: compiler-test
content: " const c = [1u8, ...b];"
- Spread:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const c = [1u8, ...b];\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 15
col_stop: 26
path: compiler-test
content: " const c = [1u8, ...b];"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 26
path: compiler-test
content: " const c = [1u8, ...b];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const d = [...b, 1u8];\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 11
col_stop: 12
path: compiler-test
content: " const d = [...b, 1u8];"
type_: ~
value:
ArrayInline:
elements:
- Spread:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const d = [...b, 1u8];\\\"}\"}"
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 7
line_stop: 7
col_start: 22
col_stop: 25
path: compiler-test
content: " const d = [...b, 1u8];"
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 26
path: compiler-test
content: " const d = [...b, 1u8];"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 26
path: compiler-test
content: " const d = [...b, 1u8];"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == c && d == a;\\\"}\"}"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == c && d == a;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == c && d == a;"
right:
Binary:
left:
Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == c && d == a;\\\"}\"}"
right:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == c && d == a;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 22
col_stop: 28
path: compiler-test
content: " return a == c && d == a;"
op: And
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 28
path: compiler-test
content: " return a == c && d == a;"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 28
path: compiler-test
content: " return a == c && d == a;"
span:
line_start: 4
line_stop: 10
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 10
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {\n...\n}\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = [1u8, 1u8];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = [1u8, 1u8];"
type_: ~
value:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 16
col_stop: 19
path: compiler-test
content: " const b = [1u8, 1u8];"
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 21
col_stop: 24
path: compiler-test
content: " const b = [1u8, 1u8];"
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 25
path: compiler-test
content: " const b = [1u8, 1u8];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 25
path: compiler-test
content: " const b = [1u8, 1u8];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const c = [1u8, ...b];\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const c = [1u8, ...b];"
type_: ~
value:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 6
line_stop: 6
col_start: 16
col_stop: 19
path: compiler-test
content: " const c = [1u8, ...b];"
- Spread:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const c = [1u8, ...b];\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 15
col_stop: 26
path: compiler-test
content: " const c = [1u8, ...b];"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 26
path: compiler-test
content: " const c = [1u8, ...b];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const d = [...b, 1u8];\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 11
col_stop: 12
path: compiler-test
content: " const d = [...b, 1u8];"
type_: ~
value:
ArrayInline:
elements:
- Spread:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const d = [...b, 1u8];\\\"}\"}"
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 7
line_stop: 7
col_start: 22
col_stop: 25
path: compiler-test
content: " const d = [...b, 1u8];"
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 26
path: compiler-test
content: " const d = [...b, 1u8];"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 26
path: compiler-test
content: " const d = [...b, 1u8];"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == c && d == a;\\\"}\"}"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == c && d == a;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == c && d == a;"
right:
Binary:
left:
Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == c && d == a;\\\"}\"}"
right:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == c && d == a;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 22
col_stop: 28
path: compiler-test
content: " return a == c && d == a;"
op: And
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 28
path: compiler-test
content: " return a == c && d == a;"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 28
path: compiler-test
content: " return a == c && d == a;"
span:
line_start: 4
line_stop: 10
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 10
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {\n...\n}\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [u8; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = [1u8, 1u8];\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = [1u8, 1u8];"
type_:
Array:
- IntegerType: U8
- - value: "2"
value:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 16
col_stop: 19
path: compiler-test
content: " const b = [1u8, 1u8];"
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 21
col_stop: 24
path: compiler-test
content: " const b = [1u8, 1u8];"
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 25
path: compiler-test
content: " const b = [1u8, 1u8];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 25
path: compiler-test
content: " const b = [1u8, 1u8];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const c = [1u8, ...b];\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const c = [1u8, ...b];"
type_:
Array:
- IntegerType: U8
- - value: "3"
value:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 6
line_stop: 6
col_start: 16
col_stop: 19
path: compiler-test
content: " const c = [1u8, ...b];"
- Spread:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const c = [1u8, ...b];\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 15
col_stop: 26
path: compiler-test
content: " const c = [1u8, ...b];"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 26
path: compiler-test
content: " const c = [1u8, ...b];"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const d = [...b, 1u8];\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 11
col_stop: 12
path: compiler-test
content: " const d = [...b, 1u8];"
type_:
Array:
- IntegerType: U8
- - value: "3"
value:
ArrayInline:
elements:
- Spread:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const d = [...b, 1u8];\\\"}\"}"
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 7
line_stop: 7
col_start: 22
col_stop: 25
path: compiler-test
content: " const d = [...b, 1u8];"
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 26
path: compiler-test
content: " const d = [...b, 1u8];"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 26
path: compiler-test
content: " const d = [...b, 1u8];"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == c && d == a;\\\"}\"}"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == c && d == a;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == c && d == a;"
right:
Binary:
left:
Identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == c && d == a;\\\"}\"}"
right:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == c && d == a;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 22
col_stop: 28
path: compiler-test
content: " return a == c && d == a;"
op: And
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 28
path: compiler-test
content: " return a == c && d == a;"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 28
path: compiler-test
content: " return a == c && d == a;"
span:
line_start: 4
line_stop: 10
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 10
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [u8; 3]) -> bool {\n...\n}\n\n\n\n"

View File

@ -16,3 +16,668 @@ outputs:
x:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 16
col_stop: 17
path: compiler-test
content: "function main (a: [u8; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 9
col_stop: 10
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
type_: ~
value:
ArrayRangeAccess:
array:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];\\\"}\"}"
left:
Value:
Implicit:
- "0"
- line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
right:
Ternary:
condition:
Binary:
left:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 22
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 26
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
right:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 31
col_stop: 34
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 30
col_stop: 38
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 38
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
if_true:
Value:
Integer:
- U8
- "2"
- line_start: 4
line_stop: 4
col_start: 40
col_stop: 43
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
if_false:
Value:
Integer:
- U8
- "2"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 49
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 50
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 50
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == [1u8, 1];\\\"}\"}"
right:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 18
col_stop: 21
path: compiler-test
content: " return y == [1u8, 1];"
- Expression:
Value:
Implicit:
- "1"
- line_start: 5
line_stop: 5
col_start: 23
col_stop: 24
path: compiler-test
content: " return y == [1u8, 1];"
span:
line_start: 5
line_stop: 5
col_start: 17
col_stop: 25
path: compiler-test
content: " return y == [1u8, 1];"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 25
path: compiler-test
content: " return y == [1u8, 1];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 25
path: compiler-test
content: " return y == [1u8, 1];"
span:
line_start: 3
line_stop: 6
col_start: 36
col_stop: 2
path: compiler-test
content: "function main (a: [u8; 3]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main (a: [u8; 3]) -> bool {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 16
col_stop: 17
path: compiler-test
content: "function main (a: [u8; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 9
col_stop: 10
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
type_: ~
value:
ArrayRangeAccess:
array:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];\\\"}\"}"
left:
Value:
Implicit:
- "0"
- line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
right:
Ternary:
condition:
Binary:
left:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 22
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 26
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
right:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 31
col_stop: 34
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 30
col_stop: 38
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 38
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
if_true:
Value:
Integer:
- U8
- "2"
- line_start: 4
line_stop: 4
col_start: 40
col_stop: 43
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
if_false:
Value:
Integer:
- U8
- "2"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 49
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 50
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 50
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == [1u8, 1];\\\"}\"}"
right:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 18
col_stop: 21
path: compiler-test
content: " return y == [1u8, 1];"
- Expression:
Value:
Implicit:
- "1"
- line_start: 5
line_stop: 5
col_start: 23
col_stop: 24
path: compiler-test
content: " return y == [1u8, 1];"
span:
line_start: 5
line_stop: 5
col_start: 17
col_stop: 25
path: compiler-test
content: " return y == [1u8, 1];"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 25
path: compiler-test
content: " return y == [1u8, 1];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 25
path: compiler-test
content: " return y == [1u8, 1];"
span:
line_start: 3
line_stop: 6
col_start: 36
col_stop: 2
path: compiler-test
content: "function main (a: [u8; 3]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main (a: [u8; 3]) -> bool {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main (a: [u8; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 16
col_stop: 17
path: compiler-test
content: "function main (a: [u8; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 9
col_stop: 10
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
type_:
Array:
- IntegerType: U8
- - value: "2"
value:
ArrayRangeAccess:
array:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];\\\"}\"}"
left:
Value:
Integer:
- U32
- "0"
- line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
right:
Ternary:
condition:
Binary:
left:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 22
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 26
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
right:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 31
col_stop: 34
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 30
col_stop: 38
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 38
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
if_true:
Value:
Integer:
- U8
- "2"
- line_start: 4
line_stop: 4
col_start: 40
col_stop: 43
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
if_false:
Value:
Integer:
- U8
- "2"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
span:
line_start: 4
line_stop: 4
col_start: 18
col_stop: 49
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 50
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 50
path: compiler-test
content: " let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8];"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == [1u8, 1];\\\"}\"}"
right:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 18
col_stop: 21
path: compiler-test
content: " return y == [1u8, 1];"
- Expression:
Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 23
col_stop: 24
path: compiler-test
content: " return y == [1u8, 1];"
span:
line_start: 5
line_stop: 5
col_start: 17
col_stop: 25
path: compiler-test
content: " return y == [1u8, 1];"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 25
path: compiler-test
content: " return y == [1u8, 1];"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 25
path: compiler-test
content: " return y == [1u8, 1];"
span:
line_start: 3
line_stop: 6
col_start: 36
col_stop: 2
path: compiler-test
content: "function main (a: [u8; 3]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main (a: [u8; 3]) -> bool {\n...\n}\n"

View File

@ -16,3 +16,769 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 23
col_stop: 27
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 16
col_stop: 28
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 31
col_stop: 35
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 37
col_stop: 41
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 30
col_stop: 42
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 45
col_stop: 49
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 51
col_stop: 55
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 44
col_stop: 56
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 57
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 57
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
type_:
Array:
- IntegerType: U32
- - value: "3"
- value: "2"
value:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 31
col_stop: 32
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
dimensions:
- value: "3"
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 4
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 23
col_stop: 27
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 16
col_stop: 28
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 31
col_stop: 35
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 37
col_stop: 41
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 30
col_stop: 42
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 45
col_stop: 49
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 51
col_stop: 55
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 44
col_stop: 56
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 57
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 57
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
type_:
Array:
- Array:
- IntegerType: U32
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 31
col_stop: 32
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
dimensions:
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
dimensions:
- value: "3"
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 4
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
type_:
Array:
- Array:
- IntegerType: U32
- - value: "2"
- - value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 23
col_stop: 27
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 16
col_stop: 28
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 31
col_stop: 35
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 37
col_stop: 41
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 30
col_stop: 42
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 45
col_stop: 49
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Expression:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 51
col_stop: 55
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 44
col_stop: 56
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 57
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 57
path: compiler-test
content: " const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
type_:
Array:
- Array:
- IntegerType: U32
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U32
- "0"
- line_start: 6
line_stop: 6
col_start: 31
col_stop: 32
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
dimensions:
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
dimensions:
- value: "3"
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 41
path: compiler-test
content: " const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 4
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"

View File

@ -16,3 +16,587 @@ outputs:
x:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 3
line_stop: 7
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 7
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 3
line_stop: 7
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 7
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 3
line_stop: 7
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 7
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {\n...\n}\n\n"

View File

@ -16,3 +16,831 @@ outputs:
x:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 5
line_stop: 5
col_start: 31
col_stop: 32
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 30
col_stop: 36
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "3"
span:
line_start: 5
line_stop: 5
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == a && a == c;\\\"}\"}"
right:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == a && a == c;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 18
path: compiler-test
content: " return b == a && a == c;"
right:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == a && a == c;\\\"}\"}"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == a && a == c;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 22
col_stop: 28
path: compiler-test
content: " return b == a && a == c;"
op: And
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 28
path: compiler-test
content: " return b == a && a == c;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 28
path: compiler-test
content: " return b == a && a == c;"
span:
line_start: 3
line_stop: 8
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 5
line_stop: 5
col_start: 31
col_stop: 32
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 30
col_stop: 36
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "3"
span:
line_start: 5
line_stop: 5
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == a && a == c;\\\"}\"}"
right:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == a && a == c;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 18
path: compiler-test
content: " return b == a && a == c;"
right:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == a && a == c;\\\"}\"}"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == a && a == c;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 22
col_stop: 28
path: compiler-test
content: " return b == a && a == c;"
op: And
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 28
path: compiler-test
content: " return b == a && a == c;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 28
path: compiler-test
content: " return b == a && a == c;"
span:
line_start: 3
line_stop: 8
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [[u8; 2]; 3]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 5
line_stop: 5
col_start: 31
col_stop: 32
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 30
col_stop: 36
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "3"
span:
line_start: 5
line_stop: 5
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == a && a == c;\\\"}\"}"
right:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == a && a == c;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 18
path: compiler-test
content: " return b == a && a == c;"
right:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == a && a == c;\\\"}\"}"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == a && a == c;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 22
col_stop: 28
path: compiler-test
content: " return b == a && a == c;"
op: And
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 28
path: compiler-test
content: " return b == a && a == c;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 28
path: compiler-test
content: " return b == a && a == c;"
span:
line_start: 3
line_stop: 8
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [[u8; 2]; 3]) -> bool {\n...\n}\n\n\n"

View File

@ -16,3 +16,770 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 5
line_stop: 5
col_start: 30
col_stop: 31
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
dimensions:
- value: "3"
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 3
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 5
line_stop: 5
col_start: 30
col_stop: 31
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
dimensions:
- value: "3"
span:
line_start: 5
line_stop: 5
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 3
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 5
line_stop: 5
col_start: 30
col_stop: 31
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
dimensions:
- value: "2"
span:
line_start: 5
line_stop: 5
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
dimensions:
- value: "3"
span:
line_start: 5
line_stop: 5
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 40
path: compiler-test
content: " const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 3
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"

View File

@ -16,3 +16,779 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "2"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 31
col_stop: 32
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 36
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "3"
span:
line_start: 6
line_stop: 6
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 3
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 31
col_stop: 32
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 36
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "3"
span:
line_start: 6
line_stop: 6
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 3
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 6
line_stop: 6
col_start: 31
col_stop: 32
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 36
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
dimensions:
- value: "3"
span:
line_start: 6
line_stop: 6
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 3
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n"

View File

@ -16,3 +16,769 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "2"
value:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 30
col_stop: 31
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
dimensions:
- value: "3"
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 3
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_: ~
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 30
col_stop: 31
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
dimensions:
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
dimensions:
- value: "3"
span:
line_start: 6
line_stop: 6
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 3
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 20
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 25
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 16
col_stop: 26
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 29
col_stop: 32
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 34
col_stop: 37
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 28
col_stop: 38
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 41
col_stop: 44
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Expression:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 46
col_stop: 49
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 50
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 51
path: compiler-test
content: " const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 6
line_stop: 6
col_start: 30
col_stop: 31
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
dimensions:
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
dimensions:
- value: "3"
span:
line_start: 6
line_stop: 6
col_start: 29
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 40
path: compiler-test
content: " const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 23
path: compiler-test
content: " return a == b == y;"
span:
line_start: 3
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n"

View File

@ -34,3 +34,225 @@ outputs:
x:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a && b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a && b;\\\"}\"}"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a && b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a && b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a && b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a && b;\\\"}\"}"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a && b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a && b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a && b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a && b;\\\"}\"}"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a && b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a && b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"

View File

@ -34,3 +34,252 @@ outputs:
x:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Ternary:
condition:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a ? b : false;\\\"}\"}"
if_true:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a ? b : false;\\\"}\"}"
if_false:
Value:
Boolean:
- "false"
- line_start: 4
line_stop: 4
col_start: 20
col_stop: 25
path: compiler-test
content: " return a ? b : false;"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 25
path: compiler-test
content: " return a ? b : false;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 25
path: compiler-test
content: " return a ? b : false;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Ternary:
condition:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a ? b : false;\\\"}\"}"
if_true:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a ? b : false;\\\"}\"}"
if_false:
Value:
Boolean:
- "false"
- line_start: 4
line_stop: 4
col_start: 20
col_stop: 25
path: compiler-test
content: " return a ? b : false;"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 25
path: compiler-test
content: " return a ? b : false;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 25
path: compiler-test
content: " return a ? b : false;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Ternary:
condition:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a ? b : false;\\\"}\"}"
if_true:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a ? b : false;\\\"}\"}"
if_false:
Value:
Boolean:
- "false"
- line_start: 4
line_stop: 4
col_start: 20
col_stop: 25
path: compiler-test
content: " return a ? b : false;"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 25
path: compiler-test
content: " return a ? b : false;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 25
path: compiler-test
content: " return a ? b : false;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"

View File

@ -34,3 +34,225 @@ outputs:
x:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"

View File

@ -34,3 +34,225 @@ outputs:
x:
type: bool
value: "false"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b;\\\"}\"}"
op: Ne
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a != b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a != b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b;\\\"}\"}"
op: Ne
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a != b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a != b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b;\\\"}\"}"
op: Ne
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a != b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a != b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"

View File

@ -34,3 +34,225 @@ outputs:
x:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a || b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a || b;\\\"}\"}"
op: Or
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a || b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a || b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a || b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a || b;\\\"}\"}"
op: Or
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a || b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a || b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a || b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a || b;\\\"}\"}"
op: Or
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a || b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a || b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"

View File

@ -100,3 +100,532 @@ outputs:
r:
type: char
value: "'\\u{1f62d}'"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" character: char;\\\"}\"}"
- Char
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
const_: false
mutable: true
type_: Char
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 24
path: compiler-test
content: "function main(character: char) -> char {"
output: Char
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { character };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { character };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { character };\\\"}\"}"
members:
- identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":19,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { character };\\\"}\"}"
expression: ~
span:
line_start: 8
line_stop: 8
col_start: 13
col_stop: 30
path: compiler-test
content: " let f = Foo { character };"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 30
path: compiler-test
content: " let f = Foo { character };"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 9
col_stop: 18
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
type_: ~
value:
Ternary:
condition:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
name: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":23,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 21
col_stop: 32
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
right:
Value:
Char:
character:
Scalar: 97
span:
line_start: 10
line_stop: 10
col_start: 36
col_stop: 39
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 21
col_stop: 39
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
if_true:
Value:
Char:
character:
Scalar: 97
span:
line_start: 10
line_stop: 10
col_start: 42
col_stop: 45
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
if_false:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":48,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
name: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":50,\\\"col_stop\\\":59,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 48
col_stop: 59
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
span:
line_start: 10
line_stop: 10
col_start: 21
col_stop: 59
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 59
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
- Return:
expression:
Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return character;\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 5
col_stop: 21
path: compiler-test
content: " return character;"
span:
line_start: 7
line_stop: 12
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}"
span:
line_start: 7
line_stop: 12
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" character: char;\\\"}\"}"
- Char
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
const_: false
mutable: true
type_: Char
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 24
path: compiler-test
content: "function main(character: char) -> char {"
output: Char
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { character };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { character };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { character };\\\"}\"}"
members:
- identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":19,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { character };\\\"}\"}"
expression: ~
span:
line_start: 8
line_stop: 8
col_start: 13
col_stop: 30
path: compiler-test
content: " let f = Foo { character };"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 30
path: compiler-test
content: " let f = Foo { character };"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 9
col_stop: 18
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
type_: ~
value:
Ternary:
condition:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
name: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":23,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 21
col_stop: 32
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
right:
Value:
Char:
character:
Scalar: 97
span:
line_start: 10
line_stop: 10
col_start: 36
col_stop: 39
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 21
col_stop: 39
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
if_true:
Value:
Char:
character:
Scalar: 97
span:
line_start: 10
line_stop: 10
col_start: 42
col_stop: 45
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
if_false:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":48,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
name: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":50,\\\"col_stop\\\":59,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 48
col_stop: 59
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
span:
line_start: 10
line_stop: 10
col_start: 21
col_stop: 59
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 59
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
- Return:
expression:
Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return character;\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 5
col_stop: 21
path: compiler-test
content: " return character;"
span:
line_start: 7
line_stop: 12
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}"
span:
line_start: 7
line_stop: 12
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" character: char;\\\"}\"}"
- Char
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
const_: false
mutable: true
type_: Char
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 24
path: compiler-test
content: "function main(character: char) -> char {"
output: Char
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { character };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { character };"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { character };\\\"}\"}"
members:
- identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":19,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { character };\\\"}\"}"
expression: ~
span:
line_start: 8
line_stop: 8
col_start: 13
col_stop: 30
path: compiler-test
content: " let f = Foo { character };"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 30
path: compiler-test
content: " let f = Foo { character };"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 9
col_stop: 18
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
type_: Char
value:
Ternary:
condition:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
name: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":23,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 21
col_stop: 32
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
right:
Value:
Char:
character:
Scalar: 97
span:
line_start: 10
line_stop: 10
col_start: 36
col_stop: 39
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 21
col_stop: 39
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
if_true:
Value:
Char:
character:
Scalar: 97
span:
line_start: 10
line_stop: 10
col_start: 42
col_stop: 45
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
if_false:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":48,\\\"col_stop\\\":49,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
name: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":50,\\\"col_stop\\\":59,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let character = f.character == 'a' ? 'a' : f.character;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 48
col_stop: 59
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
span:
line_start: 10
line_stop: 10
col_start: 21
col_stop: 59
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 59
path: compiler-test
content: " let character = f.character == 'a' ? 'a' : f.character;"
- Return:
expression:
Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return character;\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 5
col_stop: 21
path: compiler-test
content: " return character;"
span:
line_start: 7
line_stop: 12
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}"
span:
line_start: 7
line_stop: 12
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}\n\n\n"

View File

@ -100,3 +100,318 @@ outputs:
r:
type: char
value: "'a'"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
const_: false
mutable: true
type_: Char
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 24
path: compiler-test
content: "function main(character: char) -> char {"
output: Char
block:
statements:
- Return:
expression:
Ternary:
condition:
Binary:
left:
Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return character != 'a' ? 'a' : 'Z';\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 97
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 28
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
op: Ne
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 28
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
if_true:
Value:
Char:
character:
Scalar: 97
span:
line_start: 4
line_stop: 4
col_start: 31
col_stop: 34
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
if_false:
Value:
Char:
character:
Scalar: 90
span:
line_start: 4
line_stop: 4
col_start: 37
col_stop: 40
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 40
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 40
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
const_: false
mutable: true
type_: Char
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 24
path: compiler-test
content: "function main(character: char) -> char {"
output: Char
block:
statements:
- Return:
expression:
Ternary:
condition:
Binary:
left:
Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return character != 'a' ? 'a' : 'Z';\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 97
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 28
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
op: Ne
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 28
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
if_true:
Value:
Char:
character:
Scalar: 97
span:
line_start: 4
line_stop: 4
col_start: 31
col_stop: 34
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
if_false:
Value:
Char:
character:
Scalar: 90
span:
line_start: 4
line_stop: 4
col_start: 37
col_stop: 40
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 40
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 40
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
const_: false
mutable: true
type_: Char
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 24
path: compiler-test
content: "function main(character: char) -> char {"
output: Char
block:
statements:
- Return:
expression:
Ternary:
condition:
Binary:
left:
Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return character != 'a' ? 'a' : 'Z';\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 97
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 28
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
op: Ne
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 28
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
if_true:
Value:
Char:
character:
Scalar: 97
span:
line_start: 4
line_stop: 4
col_start: 31
col_stop: 34
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
if_false:
Value:
Char:
character:
Scalar: 90
span:
line_start: 4
line_stop: 4
col_start: 37
col_stop: 40
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 40
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 40
path: compiler-test
content: " return character != 'a' ? 'a' : 'Z';"
span:
line_start: 3
line_stop: 5
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}"

File diff suppressed because it is too large Load Diff

View File

@ -100,3 +100,354 @@ outputs:
r:
type: char
value: "'\\u{1f62d}'"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
const_: false
mutable: true
type_: Char
span:
line_start: 2
line_stop: 2
col_start: 15
col_stop: 24
path: compiler-test
content: "function main(character: char) -> char {"
output: Char
block:
statements:
- Console:
function:
Log:
parts:
- Const: ""
- Container
parameters:
- Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", character);\\\"}\"}"
span:
line_start: 3
line_stop: 3
col_start: 17
col_stop: 32
path: compiler-test
content: " console.log(\"{}\", character);"
span:
line_start: 3
line_stop: 3
col_start: 5
col_stop: 32
path: compiler-test
content: " console.log(\"{}\", character);"
- Return:
expression:
Ternary:
condition:
Binary:
left:
Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return character == 'z' ? 'x' : character;\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 122
span:
line_start: 5
line_stop: 5
col_start: 25
col_stop: 28
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 28
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
if_true:
Value:
Char:
character:
Scalar: 120
span:
line_start: 5
line_stop: 5
col_start: 31
col_stop: 34
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
if_false:
Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":37,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return character == 'z' ? 'x' : character;\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 46
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 46
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
span:
line_start: 2
line_stop: 6
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}"
span:
line_start: 2
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
const_: false
mutable: true
type_: Char
span:
line_start: 2
line_stop: 2
col_start: 15
col_stop: 24
path: compiler-test
content: "function main(character: char) -> char {"
output: Char
block:
statements:
- Console:
function:
Log:
parts:
- Const: ""
- Container
parameters:
- Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", character);\\\"}\"}"
span:
line_start: 3
line_stop: 3
col_start: 17
col_stop: 32
path: compiler-test
content: " console.log(\"{}\", character);"
span:
line_start: 3
line_stop: 3
col_start: 5
col_stop: 32
path: compiler-test
content: " console.log(\"{}\", character);"
- Return:
expression:
Ternary:
condition:
Binary:
left:
Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return character == 'z' ? 'x' : character;\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 122
span:
line_start: 5
line_stop: 5
col_start: 25
col_stop: 28
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 28
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
if_true:
Value:
Char:
character:
Scalar: 120
span:
line_start: 5
line_stop: 5
col_start: 31
col_stop: 34
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
if_false:
Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":37,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return character == 'z' ? 'x' : character;\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 46
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 46
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
span:
line_start: 2
line_stop: 6
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}"
span:
line_start: 2
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(character: char) -> char {\\\"}\"}"
const_: false
mutable: true
type_: Char
span:
line_start: 2
line_stop: 2
col_start: 15
col_stop: 24
path: compiler-test
content: "function main(character: char) -> char {"
output: Char
block:
statements:
- Console:
function:
Log:
parts:
- Const: ""
- Container
parameters:
- Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":23,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", character);\\\"}\"}"
span:
line_start: 3
line_stop: 3
col_start: 17
col_stop: 32
path: compiler-test
content: " console.log(\"{}\", character);"
span:
line_start: 3
line_stop: 3
col_start: 5
col_stop: 32
path: compiler-test
content: " console.log(\"{}\", character);"
- Return:
expression:
Ternary:
condition:
Binary:
left:
Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return character == 'z' ? 'x' : character;\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 122
span:
line_start: 5
line_stop: 5
col_start: 25
col_stop: 28
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 28
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
if_true:
Value:
Char:
character:
Scalar: 120
span:
line_start: 5
line_stop: 5
col_start: 31
col_stop: 34
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
if_false:
Identifier: "{\"name\":\"character\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":37,\\\"col_stop\\\":46,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return character == 'z' ? 'x' : character;\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 46
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 46
path: compiler-test
content: " return character == 'z' ? 'x' : character;"
span:
line_start: 2
line_stop: 6
col_start: 40
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}"
span:
line_start: 2
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(character: char) -> char {\n...\n}\n\n"

View File

@ -16,3 +16,674 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u8;\\\"}\"}"
- IntegerType: U8
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"use_a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function use_a(const self) -> u8 {\\\"}\"}"
input:
- ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function use_a(const self) -> u8 {\\\"}\"}"
output:
IntegerType: U8
block:
statements:
- Return:
expression:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.a + 1;\\\"}\"}"
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.a + 1;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 22
path: compiler-test
content: " return self.a + 1;"
right:
Value:
Implicit:
- "1"
- line_start: 7
line_stop: 7
col_start: 25
col_stop: 26
path: compiler-test
content: " return self.a + 1;"
op: Add
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 26
path: compiler-test
content: " return self.a + 1;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 26
path: compiler-test
content: " return self.a + 1;"
span:
line_start: 6
line_stop: 8
col_start: 38
col_stop: 6
path: compiler-test
content: " function use_a(const self) -> u8 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function use_a(const self) -> u8 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { a: 0u8 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
expression:
Value:
Integer:
- U8
- "0"
- line_start: 12
line_stop: 12
col_start: 23
col_stop: 26
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 12
line_stop: 12
col_start: 14
col_stop: 28
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 28
path: compiler-test
content: " let f = Foo { a: 0u8 };"
- Return:
expression:
Binary:
left:
Binary:
left:
Value:
Integer:
- U8
- "1"
- line_start: 14
line_stop: 14
col_start: 12
col_stop: 15
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
right:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return 1u8 == f.use_a() == true;\\\"}\"}"
name: "{\"name\":\"use_a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":21,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return 1u8 == f.use_a() == true;\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 19
col_stop: 26
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
arguments: []
span:
line_start: 14
line_stop: 14
col_start: 19
col_stop: 28
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 28
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
right:
Value:
Boolean:
- "true"
- line_start: 14
line_stop: 14
col_start: 32
col_stop: 36
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 36
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 36
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
span:
line_start: 11
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u8;\\\"}\"}"
- IntegerType: U8
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"use_a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function use_a(const self) -> u8 {\\\"}\"}"
input:
- ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function use_a(const self) -> u8 {\\\"}\"}"
output:
IntegerType: U8
block:
statements:
- Return:
expression:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.a + 1;\\\"}\"}"
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.a + 1;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 22
path: compiler-test
content: " return self.a + 1;"
right:
Value:
Implicit:
- "1"
- line_start: 7
line_stop: 7
col_start: 25
col_stop: 26
path: compiler-test
content: " return self.a + 1;"
op: Add
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 26
path: compiler-test
content: " return self.a + 1;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 26
path: compiler-test
content: " return self.a + 1;"
span:
line_start: 6
line_stop: 8
col_start: 38
col_stop: 6
path: compiler-test
content: " function use_a(const self) -> u8 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function use_a(const self) -> u8 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { a: 0u8 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
expression:
Value:
Integer:
- U8
- "0"
- line_start: 12
line_stop: 12
col_start: 23
col_stop: 26
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 12
line_stop: 12
col_start: 14
col_stop: 28
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 28
path: compiler-test
content: " let f = Foo { a: 0u8 };"
- Return:
expression:
Binary:
left:
Binary:
left:
Value:
Integer:
- U8
- "1"
- line_start: 14
line_stop: 14
col_start: 12
col_stop: 15
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
right:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return 1u8 == f.use_a() == true;\\\"}\"}"
name: "{\"name\":\"use_a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":21,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return 1u8 == f.use_a() == true;\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 19
col_stop: 26
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
arguments: []
span:
line_start: 14
line_stop: 14
col_start: 19
col_stop: 28
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 28
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
right:
Value:
Boolean:
- "true"
- line_start: 14
line_stop: 14
col_start: 32
col_stop: 36
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 36
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 36
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
span:
line_start: 11
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u8;\\\"}\"}"
- IntegerType: U8
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"use_a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function use_a(const self) -> u8 {\\\"}\"}"
input:
- ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function use_a(const self) -> u8 {\\\"}\"}"
output:
IntegerType: U8
block:
statements:
- Return:
expression:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.a + 1;\\\"}\"}"
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.a + 1;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 22
path: compiler-test
content: " return self.a + 1;"
right:
Value:
Integer:
- U8
- "1"
- line_start: 7
line_stop: 7
col_start: 25
col_stop: 26
path: compiler-test
content: " return self.a + 1;"
op: Add
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 26
path: compiler-test
content: " return self.a + 1;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 26
path: compiler-test
content: " return self.a + 1;"
span:
line_start: 6
line_stop: 8
col_start: 38
col_stop: 6
path: compiler-test
content: " function use_a(const self) -> u8 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function use_a(const self) -> u8 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { a: 0u8 };"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
expression:
Value:
Integer:
- U8
- "0"
- line_start: 12
line_stop: 12
col_start: 23
col_stop: 26
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 12
line_stop: 12
col_start: 14
col_stop: 28
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 28
path: compiler-test
content: " let f = Foo { a: 0u8 };"
- Return:
expression:
Binary:
left:
Binary:
left:
Value:
Integer:
- U8
- "1"
- line_start: 14
line_stop: 14
col_start: 12
col_stop: 15
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
right:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return 1u8 == f.use_a() == true;\\\"}\"}"
name: "{\"name\":\"use_a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":21,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return 1u8 == f.use_a() == true;\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 19
col_stop: 26
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
arguments: []
span:
line_start: 14
line_stop: 14
col_start: 19
col_stop: 28
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 28
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
right:
Value:
Boolean:
- "true"
- line_start: 14
line_stop: 14
col_start: 32
col_stop: 36
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 36
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 36
path: compiler-test
content: " return 1u8 == f.use_a() == true;"
span:
line_start: 11
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"

View File

@ -16,3 +16,617 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u32,\\\"}\"}"
- IntegerType: U32
"{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Bar {\\\"}\"}":
circuit_name: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Bar {\\\"}\"}"
members:
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(a: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(a: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 8
line_stop: 8
col_start: 18
col_stop: 19
path: compiler-test
content: " function bar(a: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: a };\\\"}\"}"
span:
line_start: 9
line_stop: 9
col_start: 13
col_stop: 14
path: compiler-test
content: " let f = Foo { a: a };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":17,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: a };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: a };\\\"}\"}"
expression:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: a };\\\"}\"}"
span:
line_start: 9
line_stop: 9
col_start: 17
col_stop: 29
path: compiler-test
content: " let f = Foo { a: a };"
span:
line_start: 9
line_stop: 9
col_start: 9
col_stop: 29
path: compiler-test
content: " let f = Foo { a: a };"
- Return:
expression:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a;\\\"}\"}"
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 16
col_stop: 19
path: compiler-test
content: " return f.a;"
span:
line_start: 10
line_stop: 10
col_start: 9
col_stop: 19
path: compiler-test
content: " return f.a;"
span:
line_start: 8
line_stop: 11
col_start: 33
col_stop: 6
path: compiler-test
content: " function bar(a: u32) -> u32 {\n...\n }"
span:
line_start: 8
line_stop: 11
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar(a: u32) -> u32 {\n...\n }\n"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 14
line_stop: 14
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = Bar::bar(a);\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 9
col_stop: 10
path: compiler-test
content: " let b = Bar::bar(a);"
type_: ~
value:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = Bar::bar(a);\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = Bar::bar(a);\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 13
col_stop: 21
path: compiler-test
content: " let b = Bar::bar(a);"
arguments:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = Bar::bar(a);\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 13
col_stop: 24
path: compiler-test
content: " let b = Bar::bar(a);"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 24
path: compiler-test
content: " let b = Bar::bar(a);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 16
line_stop: 16
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 14
line_stop: 17
col_start: 31
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> bool {\n...\n}"
span:
line_start: 14
line_stop: 17
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> bool {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u32,\\\"}\"}"
- IntegerType: U32
"{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Bar {\\\"}\"}":
circuit_name: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Bar {\\\"}\"}"
members:
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(a: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(a: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 8
line_stop: 8
col_start: 18
col_stop: 19
path: compiler-test
content: " function bar(a: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: a };\\\"}\"}"
span:
line_start: 9
line_stop: 9
col_start: 13
col_stop: 14
path: compiler-test
content: " let f = Foo { a: a };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":17,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: a };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: a };\\\"}\"}"
expression:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: a };\\\"}\"}"
span:
line_start: 9
line_stop: 9
col_start: 17
col_stop: 29
path: compiler-test
content: " let f = Foo { a: a };"
span:
line_start: 9
line_stop: 9
col_start: 9
col_stop: 29
path: compiler-test
content: " let f = Foo { a: a };"
- Return:
expression:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a;\\\"}\"}"
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 16
col_stop: 19
path: compiler-test
content: " return f.a;"
span:
line_start: 10
line_stop: 10
col_start: 9
col_stop: 19
path: compiler-test
content: " return f.a;"
span:
line_start: 8
line_stop: 11
col_start: 33
col_stop: 6
path: compiler-test
content: " function bar(a: u32) -> u32 {\n...\n }"
span:
line_start: 8
line_stop: 11
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar(a: u32) -> u32 {\n...\n }\n"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 14
line_stop: 14
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = Bar::bar(a);\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 9
col_stop: 10
path: compiler-test
content: " let b = Bar::bar(a);"
type_: ~
value:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = Bar::bar(a);\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = Bar::bar(a);\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 13
col_stop: 21
path: compiler-test
content: " let b = Bar::bar(a);"
arguments:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = Bar::bar(a);\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 13
col_stop: 24
path: compiler-test
content: " let b = Bar::bar(a);"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 24
path: compiler-test
content: " let b = Bar::bar(a);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 16
line_stop: 16
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 14
line_stop: 17
col_start: 31
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> bool {\n...\n}"
span:
line_start: 14
line_stop: 17
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> bool {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u32,\\\"}\"}"
- IntegerType: U32
"{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Bar {\\\"}\"}":
circuit_name: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Bar {\\\"}\"}"
members:
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(a: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(a: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 8
line_stop: 8
col_start: 18
col_stop: 19
path: compiler-test
content: " function bar(a: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: a };\\\"}\"}"
span:
line_start: 9
line_stop: 9
col_start: 13
col_stop: 14
path: compiler-test
content: " let f = Foo { a: a };"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":17,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: a };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: a };\\\"}\"}"
expression:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: a };\\\"}\"}"
span:
line_start: 9
line_stop: 9
col_start: 17
col_stop: 29
path: compiler-test
content: " let f = Foo { a: a };"
span:
line_start: 9
line_stop: 9
col_start: 9
col_stop: 29
path: compiler-test
content: " let f = Foo { a: a };"
- Return:
expression:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a;\\\"}\"}"
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 16
col_stop: 19
path: compiler-test
content: " return f.a;"
span:
line_start: 10
line_stop: 10
col_start: 9
col_stop: 19
path: compiler-test
content: " return f.a;"
span:
line_start: 8
line_stop: 11
col_start: 33
col_stop: 6
path: compiler-test
content: " function bar(a: u32) -> u32 {\n...\n }"
span:
line_start: 8
line_stop: 11
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar(a: u32) -> u32 {\n...\n }\n"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 14
line_stop: 14
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = Bar::bar(a);\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 9
col_stop: 10
path: compiler-test
content: " let b = Bar::bar(a);"
type_:
IntegerType: U32
value:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = Bar::bar(a);\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = Bar::bar(a);\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 13
col_stop: 21
path: compiler-test
content: " let b = Bar::bar(a);"
arguments:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = Bar::bar(a);\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 13
col_stop: 24
path: compiler-test
content: " let b = Bar::bar(a);"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 24
path: compiler-test
content: " let b = Bar::bar(a);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 16
line_stop: 16
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 14
line_stop: 17
col_start: 31
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> bool {\n...\n}"
span:
line_start: 14
line_stop: 17
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> bool {\n...\n}\n"

View File

@ -16,3 +16,810 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Bar {\\\"}\"}":
circuit_name: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Bar {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"b2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b2: u32\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"add_five\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_five(z: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_five(z: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 6
line_stop: 6
col_start: 23
col_stop: 24
path: compiler-test
content: " function add_five(z: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z + 5u32;\\\"}\"}"
right:
Value:
Integer:
- U32
- "5"
- line_start: 7
line_stop: 7
col_start: 20
col_stop: 24
path: compiler-test
content: " return z + 5u32;"
op: Add
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 24
path: compiler-test
content: " return z + 5u32;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 24
path: compiler-test
content: " return z + 5u32;"
span:
line_start: 6
line_stop: 8
col_start: 38
col_stop: 6
path: compiler-test
content: " function add_five(z: u32) -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function add_five(z: u32) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const Bar = 66u32;\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 14
path: compiler-test
content: " const Bar = 66u32;"
type_: ~
value:
Value:
Integer:
- U32
- "66"
- line_start: 12
line_stop: 12
col_start: 17
col_stop: 22
path: compiler-test
content: " const Bar = 66u32;"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 22
path: compiler-test
content: " const Bar = 66u32;"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"k1\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k1 = Bar { b2: 30u32 };\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 13
path: compiler-test
content: " const k1 = Bar { b2: 30u32 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k1 = Bar { b2: 30u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"b2\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":22,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k1 = Bar { b2: 30u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "30"
- line_start: 13
line_stop: 13
col_start: 26
col_stop: 31
path: compiler-test
content: " const k1 = Bar { b2: 30u32 };"
span:
line_start: 13
line_stop: 13
col_start: 16
col_stop: 33
path: compiler-test
content: " const k1 = Bar { b2: 30u32 };"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 33
path: compiler-test
content: " const k1 = Bar { b2: 30u32 };"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"k2\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":11,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k2 = Bar::add_five(55u32);\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 11
col_stop: 13
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
type_: ~
value:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k2 = Bar::add_five(55u32);\\\"}\"}"
name: "{\"name\":\"add_five\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":21,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k2 = Bar::add_five(55u32);\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 16
col_stop: 29
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
arguments:
- Value:
Integer:
- U32
- "55"
- line_start: 14
line_stop: 14
col_start: 30
col_stop: 35
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
span:
line_start: 14
line_stop: 14
col_start: 16
col_stop: 36
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 36
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 16
line_stop: 16
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 16
line_stop: 16
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 11
line_stop: 17
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 17
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Bar {\\\"}\"}":
circuit_name: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Bar {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"b2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b2: u32\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"add_five\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_five(z: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_five(z: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 6
line_stop: 6
col_start: 23
col_stop: 24
path: compiler-test
content: " function add_five(z: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z + 5u32;\\\"}\"}"
right:
Value:
Integer:
- U32
- "5"
- line_start: 7
line_stop: 7
col_start: 20
col_stop: 24
path: compiler-test
content: " return z + 5u32;"
op: Add
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 24
path: compiler-test
content: " return z + 5u32;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 24
path: compiler-test
content: " return z + 5u32;"
span:
line_start: 6
line_stop: 8
col_start: 38
col_stop: 6
path: compiler-test
content: " function add_five(z: u32) -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function add_five(z: u32) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const Bar = 66u32;\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 14
path: compiler-test
content: " const Bar = 66u32;"
type_: ~
value:
Value:
Integer:
- U32
- "66"
- line_start: 12
line_stop: 12
col_start: 17
col_stop: 22
path: compiler-test
content: " const Bar = 66u32;"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 22
path: compiler-test
content: " const Bar = 66u32;"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"k1\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k1 = Bar { b2: 30u32 };\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 13
path: compiler-test
content: " const k1 = Bar { b2: 30u32 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k1 = Bar { b2: 30u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"b2\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":22,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k1 = Bar { b2: 30u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "30"
- line_start: 13
line_stop: 13
col_start: 26
col_stop: 31
path: compiler-test
content: " const k1 = Bar { b2: 30u32 };"
span:
line_start: 13
line_stop: 13
col_start: 16
col_stop: 33
path: compiler-test
content: " const k1 = Bar { b2: 30u32 };"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 33
path: compiler-test
content: " const k1 = Bar { b2: 30u32 };"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"k2\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":11,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k2 = Bar::add_five(55u32);\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 11
col_stop: 13
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
type_: ~
value:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k2 = Bar::add_five(55u32);\\\"}\"}"
name: "{\"name\":\"add_five\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":21,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k2 = Bar::add_five(55u32);\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 16
col_stop: 29
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
arguments:
- Value:
Integer:
- U32
- "55"
- line_start: 14
line_stop: 14
col_start: 30
col_stop: 35
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
span:
line_start: 14
line_stop: 14
col_start: 16
col_stop: 36
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 36
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 16
line_stop: 16
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 16
line_stop: 16
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 11
line_stop: 17
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 17
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Bar {\\\"}\"}":
circuit_name: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Bar {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"b2\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":7,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b2: u32\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"add_five\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_five(z: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_five(z: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 6
line_stop: 6
col_start: 23
col_stop: 24
path: compiler-test
content: " function add_five(z: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return z + 5u32;\\\"}\"}"
right:
Value:
Integer:
- U32
- "5"
- line_start: 7
line_stop: 7
col_start: 20
col_stop: 24
path: compiler-test
content: " return z + 5u32;"
op: Add
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 24
path: compiler-test
content: " return z + 5u32;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 24
path: compiler-test
content: " return z + 5u32;"
span:
line_start: 6
line_stop: 8
col_start: 38
col_stop: 6
path: compiler-test
content: " function add_five(z: u32) -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function add_five(z: u32) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const Bar = 66u32;\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 14
path: compiler-test
content: " const Bar = 66u32;"
type_:
IntegerType: U32
value:
Value:
Integer:
- U32
- "66"
- line_start: 12
line_stop: 12
col_start: 17
col_stop: 22
path: compiler-test
content: " const Bar = 66u32;"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 22
path: compiler-test
content: " const Bar = 66u32;"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"k1\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k1 = Bar { b2: 30u32 };\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 13
path: compiler-test
content: " const k1 = Bar { b2: 30u32 };"
type_:
Circuit: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Bar {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k1 = Bar { b2: 30u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"b2\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":22,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k1 = Bar { b2: 30u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "30"
- line_start: 13
line_stop: 13
col_start: 26
col_stop: 31
path: compiler-test
content: " const k1 = Bar { b2: 30u32 };"
span:
line_start: 13
line_stop: 13
col_start: 16
col_stop: 33
path: compiler-test
content: " const k1 = Bar { b2: 30u32 };"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 33
path: compiler-test
content: " const k1 = Bar { b2: 30u32 };"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"k2\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":11,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k2 = Bar::add_five(55u32);\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 11
col_stop: 13
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
type_:
IntegerType: U32
value:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k2 = Bar::add_five(55u32);\\\"}\"}"
name: "{\"name\":\"add_five\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":21,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const k2 = Bar::add_five(55u32);\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 16
col_stop: 29
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
arguments:
- Value:
Integer:
- U32
- "55"
- line_start: 14
line_stop: 14
col_start: 30
col_stop: 35
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
span:
line_start: 14
line_stop: 14
col_start: 16
col_stop: 36
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 36
path: compiler-test
content: " const k2 = Bar::add_five(55u32);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 16
line_stop: 16
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 16
line_stop: 16
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 11
line_stop: 17
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 17
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n"

View File

@ -16,3 +16,310 @@ outputs:
r0:
type: u32
value: "100"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u32\\\"}\"}"
- IntegerType: U32
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: x };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 9
col_stop: 10
path: compiler-test
content: " let a = Foo { x: x };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: x };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: x };\\\"}\"}"
expression:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: x };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 13
col_stop: 25
path: compiler-test
content: " let a = Foo { x: x };"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 25
path: compiler-test
content: " let a = Foo { x: x };"
- Return:
expression:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x;\\\"}\"}"
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 15
path: compiler-test
content: " return a.x;"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 15
path: compiler-test
content: " return a.x;"
span:
line_start: 7
line_stop: 10
col_start: 30
col_stop: 2
path: compiler-test
content: "function main(x: u32) -> u32 {\n...\n}"
span:
line_start: 7
line_stop: 10
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: u32) -> u32 {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u32\\\"}\"}"
- IntegerType: U32
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: x };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 9
col_stop: 10
path: compiler-test
content: " let a = Foo { x: x };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: x };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: x };\\\"}\"}"
expression:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: x };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 13
col_stop: 25
path: compiler-test
content: " let a = Foo { x: x };"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 25
path: compiler-test
content: " let a = Foo { x: x };"
- Return:
expression:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x;\\\"}\"}"
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 15
path: compiler-test
content: " return a.x;"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 15
path: compiler-test
content: " return a.x;"
span:
line_start: 7
line_stop: 10
col_start: 30
col_stop: 2
path: compiler-test
content: "function main(x: u32) -> u32 {\n...\n}"
span:
line_start: 7
line_stop: 10
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: u32) -> u32 {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u32\\\"}\"}"
- IntegerType: U32
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: x };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 9
col_stop: 10
path: compiler-test
content: " let a = Foo { x: x };"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: x };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: x };\\\"}\"}"
expression:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x: x };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 13
col_stop: 25
path: compiler-test
content: " let a = Foo { x: x };"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 25
path: compiler-test
content: " let a = Foo { x: x };"
- Return:
expression:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x;\\\"}\"}"
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 15
path: compiler-test
content: " return a.x;"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 15
path: compiler-test
content: " return a.x;"
span:
line_start: 7
line_stop: 10
col_start: 30
col_stop: 2
path: compiler-test
content: "function main(x: u32) -> u32 {\n...\n}"
span:
line_start: 7
line_stop: 10
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: u32) -> u32 {\n...\n}\n"

View File

@ -16,3 +16,739 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u8\\\"}\"}"
- IntegerType: U8
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(x: u8) -> Self {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(x: u8) -> Self {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U8
span:
line_start: 6
line_stop: 6
col_start: 18
col_stop: 19
path: compiler-test
content: " function new(x: u8) -> Self {"
output: SelfType
block:
statements:
- Return:
expression:
CircuitInit:
name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { x };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { x };\\\"}\"}"
expression: ~
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 26
path: compiler-test
content: " return Self { x };"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 26
path: compiler-test
content: " return Self { x };"
span:
line_start: 6
line_stop: 8
col_start: 33
col_stop: 6
path: compiler-test
content: " function new(x: u8) -> Self {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function new(x: u8) -> Self {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: u8, y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: u8, y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: u8, y: bool) -> bool {\\\"}\"}"
const_: true
mutable: false
type_:
IntegerType: U8
span:
line_start: 11
line_stop: 11
col_start: 21
col_stop: 22
path: compiler-test
content: "function main(const x: u8, y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: u8, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 28
col_stop: 29
path: compiler-test
content: "function main(const x: u8, y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { x };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x };\\\"}\"}"
expression: ~
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 24
path: compiler-test
content: " const a = Foo { x };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 24
path: compiler-test
content: " const a = Foo { x };"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = Foo::new(x);\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = Foo::new(x);"
type_: ~
value:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = Foo::new(x);\\\"}\"}"
name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = Foo::new(x);\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 23
path: compiler-test
content: " const b = Foo::new(x);"
arguments:
- Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = Foo::new(x);\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 26
path: compiler-test
content: " const b = Foo::new(x);"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 26
path: compiler-test
content: " const b = Foo::new(x);"
- Return:
expression:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 15
path: compiler-test
content: " return b.x == a.x == y;"
right:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 19
col_stop: 22
path: compiler-test
content: " return b.x == a.x == y;"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 22
path: compiler-test
content: " return b.x == a.x == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 27
path: compiler-test
content: " return b.x == a.x == y;"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 27
path: compiler-test
content: " return b.x == a.x == y;"
span:
line_start: 11
line_stop: 16
col_start: 45
col_stop: 2
path: compiler-test
content: "function main(const x: u8, y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 16
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(const x: u8, y: bool) -> bool {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u8\\\"}\"}"
- IntegerType: U8
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(x: u8) -> Self {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(x: u8) -> Self {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U8
span:
line_start: 6
line_stop: 6
col_start: 18
col_stop: 19
path: compiler-test
content: " function new(x: u8) -> Self {"
output:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
block:
statements:
- Return:
expression:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { x };\\\"}\"}"
expression: ~
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 26
path: compiler-test
content: " return Self { x };"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 26
path: compiler-test
content: " return Self { x };"
span:
line_start: 6
line_stop: 8
col_start: 33
col_stop: 6
path: compiler-test
content: " function new(x: u8) -> Self {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function new(x: u8) -> Self {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: u8, y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: u8, y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: u8, y: bool) -> bool {\\\"}\"}"
const_: true
mutable: false
type_:
IntegerType: U8
span:
line_start: 11
line_stop: 11
col_start: 21
col_stop: 22
path: compiler-test
content: "function main(const x: u8, y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: u8, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 28
col_stop: 29
path: compiler-test
content: "function main(const x: u8, y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { x };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x };\\\"}\"}"
expression: ~
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 24
path: compiler-test
content: " const a = Foo { x };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 24
path: compiler-test
content: " const a = Foo { x };"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = Foo::new(x);\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = Foo::new(x);"
type_: ~
value:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = Foo::new(x);\\\"}\"}"
name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = Foo::new(x);\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 23
path: compiler-test
content: " const b = Foo::new(x);"
arguments:
- Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = Foo::new(x);\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 26
path: compiler-test
content: " const b = Foo::new(x);"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 26
path: compiler-test
content: " const b = Foo::new(x);"
- Return:
expression:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 15
path: compiler-test
content: " return b.x == a.x == y;"
right:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 19
col_stop: 22
path: compiler-test
content: " return b.x == a.x == y;"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 22
path: compiler-test
content: " return b.x == a.x == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 27
path: compiler-test
content: " return b.x == a.x == y;"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 27
path: compiler-test
content: " return b.x == a.x == y;"
span:
line_start: 11
line_stop: 16
col_start: 45
col_stop: 2
path: compiler-test
content: "function main(const x: u8, y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 16
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(const x: u8, y: bool) -> bool {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u8\\\"}\"}"
- IntegerType: U8
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(x: u8) -> Self {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function new(x: u8) -> Self {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U8
span:
line_start: 6
line_stop: 6
col_start: 18
col_stop: 19
path: compiler-test
content: " function new(x: u8) -> Self {"
output:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
block:
statements:
- Return:
expression:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return Self { x };\\\"}\"}"
expression: ~
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 26
path: compiler-test
content: " return Self { x };"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 26
path: compiler-test
content: " return Self { x };"
span:
line_start: 6
line_stop: 8
col_start: 33
col_stop: 6
path: compiler-test
content: " function new(x: u8) -> Self {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function new(x: u8) -> Self {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: u8, y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: u8, y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: u8, y: bool) -> bool {\\\"}\"}"
const_: true
mutable: false
type_:
IntegerType: U8
span:
line_start: 11
line_stop: 11
col_start: 21
col_stop: 22
path: compiler-test
content: "function main(const x: u8, y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":28,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(const x: u8, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 28
col_stop: 29
path: compiler-test
content: "function main(const x: u8, y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { x };"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x };\\\"}\"}"
expression: ~
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 24
path: compiler-test
content: " const a = Foo { x };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 24
path: compiler-test
content: " const a = Foo { x };"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = Foo::new(x);\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = Foo::new(x);"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = Foo::new(x);\\\"}\"}"
name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = Foo::new(x);\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 23
path: compiler-test
content: " const b = Foo::new(x);"
arguments:
- Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = Foo::new(x);\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 26
path: compiler-test
content: " const b = Foo::new(x);"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 26
path: compiler-test
content: " const b = Foo::new(x);"
- Return:
expression:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 15
path: compiler-test
content: " return b.x == a.x == y;"
right:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 19
col_stop: 22
path: compiler-test
content: " return b.x == a.x == y;"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 22
path: compiler-test
content: " return b.x == a.x == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b.x == a.x == y;\\\"}\"}"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 27
path: compiler-test
content: " return b.x == a.x == y;"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 27
path: compiler-test
content: " return b.x == a.x == y;"
span:
line_start: 11
line_stop: 16
col_start: 45
col_stop: 2
path: compiler-test
content: "function main(const x: u8, y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 16
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(const x: u8, y: bool) -> bool {\n...\n}\n\n\n"

View File

@ -16,3 +16,613 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"echo\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function echo(self) -> u32 {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":19,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function echo(self) -> u32 {\\\"}\"}"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 22
path: compiler-test
content: " return self.x;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 22
path: compiler-test
content: " return self.x;"
span:
line_start: 6
line_stop: 8
col_start: 32
col_stop: 6
path: compiler-test
content: " function echo(self) -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function echo(self) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { x: 1u32 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "1"
- line_start: 12
line_stop: 12
col_start: 24
col_stop: 28
path: compiler-test
content: " const a = Foo { x: 1u32 };"
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 30
path: compiler-test
content: " const a = Foo { x: 1u32 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 30
path: compiler-test
content: " const a = Foo { x: 1u32 };"
- Return:
expression:
Binary:
left:
Binary:
left:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.echo() == 1u32 == true;\\\"}\"}"
name: "{\"name\":\"echo\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.echo() == 1u32 == true;\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 18
path: compiler-test
content: " return a.echo() == 1u32 == true;"
arguments: []
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 20
path: compiler-test
content: " return a.echo() == 1u32 == true;"
right:
Value:
Integer:
- U32
- "1"
- line_start: 14
line_stop: 14
col_start: 24
col_stop: 28
path: compiler-test
content: " return a.echo() == 1u32 == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 28
path: compiler-test
content: " return a.echo() == 1u32 == true;"
right:
Value:
Boolean:
- "true"
- line_start: 14
line_stop: 14
col_start: 32
col_stop: 36
path: compiler-test
content: " return a.echo() == 1u32 == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 36
path: compiler-test
content: " return a.echo() == 1u32 == true;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 36
path: compiler-test
content: " return a.echo() == 1u32 == true;"
span:
line_start: 11
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"echo\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function echo(self) -> u32 {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":19,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function echo(self) -> u32 {\\\"}\"}"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 22
path: compiler-test
content: " return self.x;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 22
path: compiler-test
content: " return self.x;"
span:
line_start: 6
line_stop: 8
col_start: 32
col_stop: 6
path: compiler-test
content: " function echo(self) -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function echo(self) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { x: 1u32 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "1"
- line_start: 12
line_stop: 12
col_start: 24
col_stop: 28
path: compiler-test
content: " const a = Foo { x: 1u32 };"
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 30
path: compiler-test
content: " const a = Foo { x: 1u32 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 30
path: compiler-test
content: " const a = Foo { x: 1u32 };"
- Return:
expression:
Binary:
left:
Binary:
left:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.echo() == 1u32 == true;\\\"}\"}"
name: "{\"name\":\"echo\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.echo() == 1u32 == true;\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 18
path: compiler-test
content: " return a.echo() == 1u32 == true;"
arguments: []
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 20
path: compiler-test
content: " return a.echo() == 1u32 == true;"
right:
Value:
Integer:
- U32
- "1"
- line_start: 14
line_stop: 14
col_start: 24
col_stop: 28
path: compiler-test
content: " return a.echo() == 1u32 == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 28
path: compiler-test
content: " return a.echo() == 1u32 == true;"
right:
Value:
Boolean:
- "true"
- line_start: 14
line_stop: 14
col_start: 32
col_stop: 36
path: compiler-test
content: " return a.echo() == 1u32 == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 36
path: compiler-test
content: " return a.echo() == 1u32 == true;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 36
path: compiler-test
content: " return a.echo() == 1u32 == true;"
span:
line_start: 11
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"echo\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function echo(self) -> u32 {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":19,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function echo(self) -> u32 {\\\"}\"}"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 22
path: compiler-test
content: " return self.x;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 22
path: compiler-test
content: " return self.x;"
span:
line_start: 6
line_stop: 8
col_start: 32
col_stop: 6
path: compiler-test
content: " function echo(self) -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function echo(self) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { x: 1u32 };"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "1"
- line_start: 12
line_stop: 12
col_start: 24
col_stop: 28
path: compiler-test
content: " const a = Foo { x: 1u32 };"
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 30
path: compiler-test
content: " const a = Foo { x: 1u32 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 30
path: compiler-test
content: " const a = Foo { x: 1u32 };"
- Return:
expression:
Binary:
left:
Binary:
left:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.echo() == 1u32 == true;\\\"}\"}"
name: "{\"name\":\"echo\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.echo() == 1u32 == true;\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 18
path: compiler-test
content: " return a.echo() == 1u32 == true;"
arguments: []
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 20
path: compiler-test
content: " return a.echo() == 1u32 == true;"
right:
Value:
Integer:
- U32
- "1"
- line_start: 14
line_stop: 14
col_start: 24
col_stop: 28
path: compiler-test
content: " return a.echo() == 1u32 == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 28
path: compiler-test
content: " return a.echo() == 1u32 == true;"
right:
Value:
Boolean:
- "true"
- line_start: 14
line_stop: 14
col_start: 32
col_stop: 36
path: compiler-test
content: " return a.echo() == 1u32 == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 36
path: compiler-test
content: " return a.echo() == 1u32 == true;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 36
path: compiler-test
content: " return a.echo() == 1u32 == true;"
span:
line_start: 11
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"

View File

@ -16,3 +16,933 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"add_x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_x(self, y: u32) -> u32 {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_x(self, y: u32) -> u32 {\\\"}\"}"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_x(self, y: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 6
line_stop: 6
col_start: 26
col_stop: 27
path: compiler-test
content: " function add_x(self, y: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x + y;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x + y;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 22
path: compiler-test
content: " return self.x + y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x + y;\\\"}\"}"
op: Add
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 26
path: compiler-test
content: " return self.x + y;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 26
path: compiler-test
content: " return self.x + y;"
span:
line_start: 6
line_stop: 8
col_start: 41
col_stop: 6
path: compiler-test
content: " function add_x(self, y: u32) -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function add_x(self, y: u32) -> u32 {\n...\n }"
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"call_add_x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function call_add_x(self, y: u32) -> u32 {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":25,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function call_add_x(self, y: u32) -> u32 {\\\"}\"}"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function call_add_x(self, y: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 10
line_stop: 10
col_start: 31
col_stop: 32
path: compiler-test
content: " function call_add_x(self, y: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.add_x(y);\\\"}\"}"
name: "{\"name\":\"add_x\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":21,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.add_x(y);\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 16
col_stop: 26
path: compiler-test
content: " return self.add_x(y);"
arguments:
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.add_x(y);\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 16
col_stop: 29
path: compiler-test
content: " return self.add_x(y);"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 29
path: compiler-test
content: " return self.add_x(y);"
span:
line_start: 10
line_stop: 12
col_start: 46
col_stop: 6
path: compiler-test
content: " function call_add_x(self, y: u32) -> u32 {\n...\n }"
span:
line_start: 10
line_stop: 12
col_start: 5
col_stop: 6
path: compiler-test
content: " function call_add_x(self, y: u32) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 15
line_stop: 15
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: u32) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x };\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 9
col_stop: 10
path: compiler-test
content: " let a = Foo { x };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x };\\\"}\"}"
expression: ~
span:
line_start: 16
line_stop: 16
col_start: 13
col_stop: 22
path: compiler-test
content: " let a = Foo { x };"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 22
path: compiler-test
content: " let a = Foo { x };"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = a.add_x(1u32);\\\"}\"}"
span:
line_start: 17
line_stop: 17
col_start: 9
col_stop: 10
path: compiler-test
content: " let b = a.add_x(1u32);"
type_: ~
value:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = a.add_x(1u32);\\\"}\"}"
name: "{\"name\":\"add_x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":15,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = a.add_x(1u32);\\\"}\"}"
span:
line_start: 17
line_stop: 17
col_start: 13
col_stop: 20
path: compiler-test
content: " let b = a.add_x(1u32);"
arguments:
- Value:
Integer:
- U32
- "1"
- line_start: 17
line_stop: 17
col_start: 21
col_stop: 25
path: compiler-test
content: " let b = a.add_x(1u32);"
span:
line_start: 17
line_stop: 17
col_start: 13
col_stop: 26
path: compiler-test
content: " let b = a.add_x(1u32);"
span:
line_start: 17
line_stop: 17
col_start: 5
col_stop: 26
path: compiler-test
content: " let b = a.add_x(1u32);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == x + 1;\\\"}\"}"
right:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == x + 1;\\\"}\"}"
right:
Value:
Implicit:
- "1"
- line_start: 19
line_stop: 19
col_start: 21
col_stop: 22
path: compiler-test
content: " return b == x + 1;"
op: Add
span:
line_start: 19
line_stop: 19
col_start: 17
col_stop: 22
path: compiler-test
content: " return b == x + 1;"
op: Eq
span:
line_start: 19
line_stop: 19
col_start: 12
col_stop: 22
path: compiler-test
content: " return b == x + 1;"
span:
line_start: 19
line_stop: 19
col_start: 5
col_stop: 22
path: compiler-test
content: " return b == x + 1;"
span:
line_start: 15
line_stop: 20
col_start: 31
col_stop: 2
path: compiler-test
content: "function main(x: u32) -> bool {\n...\n}"
span:
line_start: 15
line_stop: 20
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: u32) -> bool {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"add_x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_x(self, y: u32) -> u32 {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_x(self, y: u32) -> u32 {\\\"}\"}"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_x(self, y: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 6
line_stop: 6
col_start: 26
col_stop: 27
path: compiler-test
content: " function add_x(self, y: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x + y;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x + y;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 22
path: compiler-test
content: " return self.x + y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x + y;\\\"}\"}"
op: Add
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 26
path: compiler-test
content: " return self.x + y;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 26
path: compiler-test
content: " return self.x + y;"
span:
line_start: 6
line_stop: 8
col_start: 41
col_stop: 6
path: compiler-test
content: " function add_x(self, y: u32) -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function add_x(self, y: u32) -> u32 {\n...\n }"
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"call_add_x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function call_add_x(self, y: u32) -> u32 {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":25,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function call_add_x(self, y: u32) -> u32 {\\\"}\"}"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function call_add_x(self, y: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 10
line_stop: 10
col_start: 31
col_stop: 32
path: compiler-test
content: " function call_add_x(self, y: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.add_x(y);\\\"}\"}"
name: "{\"name\":\"add_x\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":21,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.add_x(y);\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 16
col_stop: 26
path: compiler-test
content: " return self.add_x(y);"
arguments:
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.add_x(y);\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 16
col_stop: 29
path: compiler-test
content: " return self.add_x(y);"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 29
path: compiler-test
content: " return self.add_x(y);"
span:
line_start: 10
line_stop: 12
col_start: 46
col_stop: 6
path: compiler-test
content: " function call_add_x(self, y: u32) -> u32 {\n...\n }"
span:
line_start: 10
line_stop: 12
col_start: 5
col_stop: 6
path: compiler-test
content: " function call_add_x(self, y: u32) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 15
line_stop: 15
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: u32) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x };\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 9
col_stop: 10
path: compiler-test
content: " let a = Foo { x };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x };\\\"}\"}"
expression: ~
span:
line_start: 16
line_stop: 16
col_start: 13
col_stop: 22
path: compiler-test
content: " let a = Foo { x };"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 22
path: compiler-test
content: " let a = Foo { x };"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = a.add_x(1u32);\\\"}\"}"
span:
line_start: 17
line_stop: 17
col_start: 9
col_stop: 10
path: compiler-test
content: " let b = a.add_x(1u32);"
type_: ~
value:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = a.add_x(1u32);\\\"}\"}"
name: "{\"name\":\"add_x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":15,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = a.add_x(1u32);\\\"}\"}"
span:
line_start: 17
line_stop: 17
col_start: 13
col_stop: 20
path: compiler-test
content: " let b = a.add_x(1u32);"
arguments:
- Value:
Integer:
- U32
- "1"
- line_start: 17
line_stop: 17
col_start: 21
col_stop: 25
path: compiler-test
content: " let b = a.add_x(1u32);"
span:
line_start: 17
line_stop: 17
col_start: 13
col_stop: 26
path: compiler-test
content: " let b = a.add_x(1u32);"
span:
line_start: 17
line_stop: 17
col_start: 5
col_stop: 26
path: compiler-test
content: " let b = a.add_x(1u32);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == x + 1;\\\"}\"}"
right:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == x + 1;\\\"}\"}"
right:
Value:
Implicit:
- "1"
- line_start: 19
line_stop: 19
col_start: 21
col_stop: 22
path: compiler-test
content: " return b == x + 1;"
op: Add
span:
line_start: 19
line_stop: 19
col_start: 17
col_stop: 22
path: compiler-test
content: " return b == x + 1;"
op: Eq
span:
line_start: 19
line_stop: 19
col_start: 12
col_stop: 22
path: compiler-test
content: " return b == x + 1;"
span:
line_start: 19
line_stop: 19
col_start: 5
col_stop: 22
path: compiler-test
content: " return b == x + 1;"
span:
line_start: 15
line_stop: 20
col_start: 31
col_stop: 2
path: compiler-test
content: "function main(x: u32) -> bool {\n...\n}"
span:
line_start: 15
line_stop: 20
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: u32) -> bool {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"add_x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_x(self, y: u32) -> u32 {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_x(self, y: u32) -> u32 {\\\"}\"}"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function add_x(self, y: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 6
line_stop: 6
col_start: 26
col_stop: 27
path: compiler-test
content: " function add_x(self, y: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x + y;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x + y;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 22
path: compiler-test
content: " return self.x + y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.x + y;\\\"}\"}"
op: Add
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 26
path: compiler-test
content: " return self.x + y;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 26
path: compiler-test
content: " return self.x + y;"
span:
line_start: 6
line_stop: 8
col_start: 41
col_stop: 6
path: compiler-test
content: " function add_x(self, y: u32) -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function add_x(self, y: u32) -> u32 {\n...\n }"
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"call_add_x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function call_add_x(self, y: u32) -> u32 {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":25,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function call_add_x(self, y: u32) -> u32 {\\\"}\"}"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function call_add_x(self, y: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 10
line_stop: 10
col_start: 31
col_stop: 32
path: compiler-test
content: " function call_add_x(self, y: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.add_x(y);\\\"}\"}"
name: "{\"name\":\"add_x\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":21,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.add_x(y);\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 16
col_stop: 26
path: compiler-test
content: " return self.add_x(y);"
arguments:
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.add_x(y);\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 16
col_stop: 29
path: compiler-test
content: " return self.add_x(y);"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 29
path: compiler-test
content: " return self.add_x(y);"
span:
line_start: 10
line_stop: 12
col_start: 46
col_stop: 6
path: compiler-test
content: " function call_add_x(self, y: u32) -> u32 {\n...\n }"
span:
line_start: 10
line_stop: 12
col_start: 5
col_stop: 6
path: compiler-test
content: " function call_add_x(self, y: u32) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: u32) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 15
line_stop: 15
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: u32) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x };\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 9
col_stop: 10
path: compiler-test
content: " let a = Foo { x };"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = Foo { x };\\\"}\"}"
expression: ~
span:
line_start: 16
line_stop: 16
col_start: 13
col_stop: 22
path: compiler-test
content: " let a = Foo { x };"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 22
path: compiler-test
content: " let a = Foo { x };"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = a.add_x(1u32);\\\"}\"}"
span:
line_start: 17
line_stop: 17
col_start: 9
col_stop: 10
path: compiler-test
content: " let b = a.add_x(1u32);"
type_:
IntegerType: U32
value:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = a.add_x(1u32);\\\"}\"}"
name: "{\"name\":\"add_x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":15,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let b = a.add_x(1u32);\\\"}\"}"
span:
line_start: 17
line_stop: 17
col_start: 13
col_stop: 20
path: compiler-test
content: " let b = a.add_x(1u32);"
arguments:
- Value:
Integer:
- U32
- "1"
- line_start: 17
line_stop: 17
col_start: 21
col_stop: 25
path: compiler-test
content: " let b = a.add_x(1u32);"
span:
line_start: 17
line_stop: 17
col_start: 13
col_stop: 26
path: compiler-test
content: " let b = a.add_x(1u32);"
span:
line_start: 17
line_stop: 17
col_start: 5
col_stop: 26
path: compiler-test
content: " let b = a.add_x(1u32);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == x + 1;\\\"}\"}"
right:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == x + 1;\\\"}\"}"
right:
Value:
Integer:
- U32
- "1"
- line_start: 19
line_stop: 19
col_start: 21
col_stop: 22
path: compiler-test
content: " return b == x + 1;"
op: Add
span:
line_start: 19
line_stop: 19
col_start: 17
col_stop: 22
path: compiler-test
content: " return b == x + 1;"
op: Eq
span:
line_start: 19
line_stop: 19
col_start: 12
col_stop: 22
path: compiler-test
content: " return b == x + 1;"
span:
line_start: 19
line_stop: 19
col_start: 5
col_stop: 22
path: compiler-test
content: " return b == x + 1;"
span:
line_start: 15
line_stop: 20
col_start: 31
col_stop: 2
path: compiler-test
content: "function main(x: u32) -> bool {\n...\n}"
span:
line_start: 15
line_stop: 20
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: u32) -> bool {\n...\n}\n\n\n"

View File

@ -16,3 +16,553 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"echo\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function echo(x: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function echo(x: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 4
line_stop: 4
col_start: 19
col_stop: 20
path: compiler-test
content: " function echo(x: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x;\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 17
path: compiler-test
content: " return x;"
span:
line_start: 4
line_stop: 6
col_start: 34
col_stop: 6
path: compiler-test
content: " function echo(x: u32) -> u32 {\n...\n }"
span:
line_start: 4
line_stop: 6
col_start: 5
col_stop: 6
path: compiler-test
content: " function echo(x: u32) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 9
line_stop: 9
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo::echo(1u32);\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo::echo(1u32);"
type_: ~
value:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo::echo(1u32);\\\"}\"}"
name: "{\"name\":\"echo\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":20,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo::echo(1u32);\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 15
col_stop: 24
path: compiler-test
content: " const a = Foo::echo(1u32);"
arguments:
- Value:
Integer:
- U32
- "1"
- line_start: 10
line_stop: 10
col_start: 25
col_stop: 29
path: compiler-test
content: " const a = Foo::echo(1u32);"
span:
line_start: 10
line_stop: 10
col_start: 15
col_stop: 30
path: compiler-test
content: " const a = Foo::echo(1u32);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 30
path: compiler-test
content: " const a = Foo::echo(1u32);"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 1u32 == y;\\\"}\"}"
right:
Value:
Integer:
- U32
- "1"
- line_start: 12
line_stop: 12
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == 1u32 == y;"
op: Eq
span:
line_start: 12
line_stop: 12
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == 1u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 1u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 12
line_stop: 12
col_start: 12
col_stop: 26
path: compiler-test
content: " return a == 1u32 == y;"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 26
path: compiler-test
content: " return a == 1u32 == y;"
span:
line_start: 9
line_stop: 13
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 9
line_stop: 13
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"echo\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function echo(x: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function echo(x: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 4
line_stop: 4
col_start: 19
col_stop: 20
path: compiler-test
content: " function echo(x: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x;\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 17
path: compiler-test
content: " return x;"
span:
line_start: 4
line_stop: 6
col_start: 34
col_stop: 6
path: compiler-test
content: " function echo(x: u32) -> u32 {\n...\n }"
span:
line_start: 4
line_stop: 6
col_start: 5
col_stop: 6
path: compiler-test
content: " function echo(x: u32) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 9
line_stop: 9
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo::echo(1u32);\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo::echo(1u32);"
type_: ~
value:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo::echo(1u32);\\\"}\"}"
name: "{\"name\":\"echo\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":20,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo::echo(1u32);\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 15
col_stop: 24
path: compiler-test
content: " const a = Foo::echo(1u32);"
arguments:
- Value:
Integer:
- U32
- "1"
- line_start: 10
line_stop: 10
col_start: 25
col_stop: 29
path: compiler-test
content: " const a = Foo::echo(1u32);"
span:
line_start: 10
line_stop: 10
col_start: 15
col_stop: 30
path: compiler-test
content: " const a = Foo::echo(1u32);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 30
path: compiler-test
content: " const a = Foo::echo(1u32);"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 1u32 == y;\\\"}\"}"
right:
Value:
Integer:
- U32
- "1"
- line_start: 12
line_stop: 12
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == 1u32 == y;"
op: Eq
span:
line_start: 12
line_stop: 12
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == 1u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 1u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 12
line_stop: 12
col_start: 12
col_stop: 26
path: compiler-test
content: " return a == 1u32 == y;"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 26
path: compiler-test
content: " return a == 1u32 == y;"
span:
line_start: 9
line_stop: 13
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 9
line_stop: 13
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"echo\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function echo(x: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function echo(x: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 4
line_stop: 4
col_start: 19
col_stop: 20
path: compiler-test
content: " function echo(x: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x;\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 17
path: compiler-test
content: " return x;"
span:
line_start: 4
line_stop: 6
col_start: 34
col_stop: 6
path: compiler-test
content: " function echo(x: u32) -> u32 {\n...\n }"
span:
line_start: 4
line_stop: 6
col_start: 5
col_stop: 6
path: compiler-test
content: " function echo(x: u32) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 9
line_stop: 9
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo::echo(1u32);\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo::echo(1u32);"
type_:
IntegerType: U32
value:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo::echo(1u32);\\\"}\"}"
name: "{\"name\":\"echo\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":20,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo::echo(1u32);\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 15
col_stop: 24
path: compiler-test
content: " const a = Foo::echo(1u32);"
arguments:
- Value:
Integer:
- U32
- "1"
- line_start: 10
line_stop: 10
col_start: 25
col_stop: 29
path: compiler-test
content: " const a = Foo::echo(1u32);"
span:
line_start: 10
line_stop: 10
col_start: 15
col_stop: 30
path: compiler-test
content: " const a = Foo::echo(1u32);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 30
path: compiler-test
content: " const a = Foo::echo(1u32);"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 1u32 == y;\\\"}\"}"
right:
Value:
Integer:
- U32
- "1"
- line_start: 12
line_stop: 12
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == 1u32 == y;"
op: Eq
span:
line_start: 12
line_stop: 12
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == 1u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 1u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 12
line_stop: 12
col_start: 12
col_stop: 26
path: compiler-test
content: " return a == 1u32 == y;"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 26
path: compiler-test
content: " return a == 1u32 == y;"
span:
line_start: 9
line_stop: 13
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 9
line_stop: 13
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"

View File

@ -16,3 +16,687 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"qux\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function qux() {}\\\"}\"}"
input: []
output: ~
block:
statements: []
span:
line_start: 4
line_stop: 4
col_start: 20
col_stop: 22
path: compiler-test
content: " function qux() {}"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 22
path: compiler-test
content: " function qux() {}"
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar() {\\\"}\"}"
input: []
output: ~
block:
statements:
- Expression:
expression:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Self::qux();\\\"}\"}"
name: "{\"name\":\"qux\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Self::qux();\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 18
path: compiler-test
content: " Self::qux();"
arguments: []
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 20
path: compiler-test
content: " Self::qux();"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 20
path: compiler-test
content: " Self::qux();"
span:
line_start: 6
line_stop: 8
col_start: 20
col_stop: 6
path: compiler-test
content: " function bar() {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar() {\n...\n }"
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function baz() {\\\"}\"}"
input: []
output: ~
block:
statements:
- Expression:
expression:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Self::bar();\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Self::bar();\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 18
path: compiler-test
content: " Self::bar();"
arguments: []
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 20
path: compiler-test
content: " Self::bar();"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 20
path: compiler-test
content: " Self::bar();"
span:
line_start: 10
line_stop: 12
col_start: 20
col_stop: 6
path: compiler-test
content: " function baz() {\n...\n }"
span:
line_start: 10
line_stop: 12
col_start: 5
col_stop: 6
path: compiler-test
content: " function baz() {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 15
line_stop: 15
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Expression:
expression:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Foo::baz();\\\"}\"}"
name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Foo::baz();\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 13
path: compiler-test
content: " Foo::baz();"
arguments: []
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 15
path: compiler-test
content: " Foo::baz();"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 15
path: compiler-test
content: " Foo::baz();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 18
line_stop: 18
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 18
line_stop: 18
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 18
line_stop: 18
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 15
line_stop: 19
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 15
line_stop: 19
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"qux\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function qux() {}\\\"}\"}"
input: []
output:
Tuple: []
block:
statements: []
span:
line_start: 4
line_stop: 4
col_start: 20
col_stop: 22
path: compiler-test
content: " function qux() {}"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 22
path: compiler-test
content: " function qux() {}"
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar() {\\\"}\"}"
input: []
output:
Tuple: []
block:
statements:
- Expression:
expression:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Self::qux();\\\"}\"}"
name: "{\"name\":\"qux\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Self::qux();\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 18
path: compiler-test
content: " Self::qux();"
arguments: []
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 20
path: compiler-test
content: " Self::qux();"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 20
path: compiler-test
content: " Self::qux();"
span:
line_start: 6
line_stop: 8
col_start: 20
col_stop: 6
path: compiler-test
content: " function bar() {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar() {\n...\n }"
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function baz() {\\\"}\"}"
input: []
output:
Tuple: []
block:
statements:
- Expression:
expression:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Self::bar();\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Self::bar();\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 18
path: compiler-test
content: " Self::bar();"
arguments: []
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 20
path: compiler-test
content: " Self::bar();"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 20
path: compiler-test
content: " Self::bar();"
span:
line_start: 10
line_stop: 12
col_start: 20
col_stop: 6
path: compiler-test
content: " function baz() {\n...\n }"
span:
line_start: 10
line_stop: 12
col_start: 5
col_stop: 6
path: compiler-test
content: " function baz() {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 15
line_stop: 15
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Expression:
expression:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Foo::baz();\\\"}\"}"
name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Foo::baz();\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 13
path: compiler-test
content: " Foo::baz();"
arguments: []
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 15
path: compiler-test
content: " Foo::baz();"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 15
path: compiler-test
content: " Foo::baz();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 18
line_stop: 18
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 18
line_stop: 18
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 18
line_stop: 18
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 15
line_stop: 19
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 15
line_stop: 19
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"qux\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function qux() {}\\\"}\"}"
input: []
output:
Tuple: []
block:
statements: []
span:
line_start: 4
line_stop: 4
col_start: 20
col_stop: 22
path: compiler-test
content: " function qux() {}"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 22
path: compiler-test
content: " function qux() {}"
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar() {\\\"}\"}"
input: []
output:
Tuple: []
block:
statements:
- Expression:
expression:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Self::qux();\\\"}\"}"
name: "{\"name\":\"qux\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Self::qux();\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 18
path: compiler-test
content: " Self::qux();"
arguments: []
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 20
path: compiler-test
content: " Self::qux();"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 20
path: compiler-test
content: " Self::qux();"
span:
line_start: 6
line_stop: 8
col_start: 20
col_stop: 6
path: compiler-test
content: " function bar() {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar() {\n...\n }"
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function baz() {\\\"}\"}"
input: []
output:
Tuple: []
block:
statements:
- Expression:
expression:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Self::bar();\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Self::bar();\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 18
path: compiler-test
content: " Self::bar();"
arguments: []
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 20
path: compiler-test
content: " Self::bar();"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 20
path: compiler-test
content: " Self::bar();"
span:
line_start: 10
line_stop: 12
col_start: 20
col_stop: 6
path: compiler-test
content: " function baz() {\n...\n }"
span:
line_start: 10
line_stop: 12
col_start: 5
col_stop: 6
path: compiler-test
content: " function baz() {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 15
line_stop: 15
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Expression:
expression:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Foo::baz();\\\"}\"}"
name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" Foo::baz();\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 13
path: compiler-test
content: " Foo::baz();"
arguments: []
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 15
path: compiler-test
content: " Foo::baz();"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 15
path: compiler-test
content: " Foo::baz();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 18
line_stop: 18
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 18
line_stop: 18
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 18
line_stop: 18
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 15
line_stop: 19
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 15
line_stop: 19
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"

View File

@ -16,3 +16,430 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}"
- IntegerType: U32
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { x: 1u32 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "1"
- line_start: 8
line_stop: 8
col_start: 24
col_stop: 28
path: compiler-test
content: " const a = Foo { x: 1u32 };"
span:
line_start: 8
line_stop: 8
col_start: 15
col_stop: 30
path: compiler-test
content: " const a = Foo { x: 1u32 };"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 30
path: compiler-test
content: " const a = Foo { x: 1u32 };"
- Return:
expression:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 1u32 == y;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 1u32 == y;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 15
path: compiler-test
content: " return a.x == 1u32 == y;"
right:
Value:
Integer:
- U32
- "1"
- line_start: 10
line_stop: 10
col_start: 19
col_stop: 23
path: compiler-test
content: " return a.x == 1u32 == y;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 23
path: compiler-test
content: " return a.x == 1u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 1u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 28
path: compiler-test
content: " return a.x == 1u32 == y;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 28
path: compiler-test
content: " return a.x == 1u32 == y;"
span:
line_start: 7
line_stop: 11
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}"
- IntegerType: U32
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { x: 1u32 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "1"
- line_start: 8
line_stop: 8
col_start: 24
col_stop: 28
path: compiler-test
content: " const a = Foo { x: 1u32 };"
span:
line_start: 8
line_stop: 8
col_start: 15
col_stop: 30
path: compiler-test
content: " const a = Foo { x: 1u32 };"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 30
path: compiler-test
content: " const a = Foo { x: 1u32 };"
- Return:
expression:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 1u32 == y;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 1u32 == y;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 15
path: compiler-test
content: " return a.x == 1u32 == y;"
right:
Value:
Integer:
- U32
- "1"
- line_start: 10
line_stop: 10
col_start: 19
col_stop: 23
path: compiler-test
content: " return a.x == 1u32 == y;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 23
path: compiler-test
content: " return a.x == 1u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 1u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 28
path: compiler-test
content: " return a.x == 1u32 == y;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 28
path: compiler-test
content: " return a.x == 1u32 == y;"
span:
line_start: 7
line_stop: 11
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}"
- IntegerType: U32
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { x: 1u32 };"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { x: 1u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "1"
- line_start: 8
line_stop: 8
col_start: 24
col_stop: 28
path: compiler-test
content: " const a = Foo { x: 1u32 };"
span:
line_start: 8
line_stop: 8
col_start: 15
col_stop: 30
path: compiler-test
content: " const a = Foo { x: 1u32 };"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 30
path: compiler-test
content: " const a = Foo { x: 1u32 };"
- Return:
expression:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 1u32 == y;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 1u32 == y;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 15
path: compiler-test
content: " return a.x == 1u32 == y;"
right:
Value:
Integer:
- U32
- "1"
- line_start: 10
line_stop: 10
col_start: 19
col_stop: 23
path: compiler-test
content: " return a.x == 1u32 == y;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 23
path: compiler-test
content: " return a.x == 1u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a.x == 1u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 28
path: compiler-test
content: " return a.x == 1u32 == y;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 28
path: compiler-test
content: " return a.x == 1u32 == y;"
span:
line_start: 7
line_stop: 11
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"

View File

@ -16,3 +16,714 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" foo: u32;\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar() -> u32 {\\\"}\"}"
input: []
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "1"
- line_start: 7
line_stop: 7
col_start: 16
col_stop: 20
path: compiler-test
content: " return 1u32;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 20
path: compiler-test
content: " return 1u32;"
span:
line_start: 6
line_stop: 8
col_start: 27
col_stop: 6
path: compiler-test
content: " function bar() -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar() -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { foo: 1 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { foo: 1 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { foo: 1 };\\\"}\"}"
members:
- identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { foo: 1 };\\\"}\"}"
expression:
Value:
Implicit:
- "1"
- line_start: 12
line_stop: 12
col_start: 26
col_stop: 27
path: compiler-test
content: " const a = Foo { foo: 1 };"
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 29
path: compiler-test
content: " const a = Foo { foo: 1 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 29
path: compiler-test
content: " const a = Foo { foo: 1 };"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = a.foo + Foo::bar();"
type_: ~
value:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
name: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 20
path: compiler-test
content: " const b = a.foo + Foo::bar();"
right:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":28,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 23
col_stop: 31
path: compiler-test
content: " const b = a.foo + Foo::bar();"
arguments: []
span:
line_start: 13
line_stop: 13
col_start: 23
col_stop: 33
path: compiler-test
content: " const b = a.foo + Foo::bar();"
op: Add
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 33
path: compiler-test
content: " const b = a.foo + Foo::bar();"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 33
path: compiler-test
content: " const b = a.foo + Foo::bar();"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == 2u32 == y;\\\"}\"}"
right:
Value:
Integer:
- U32
- "2"
- line_start: 15
line_stop: 15
col_start: 17
col_stop: 21
path: compiler-test
content: " return b == 2u32 == y;"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 21
path: compiler-test
content: " return b == 2u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == 2u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 26
path: compiler-test
content: " return b == 2u32 == y;"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 26
path: compiler-test
content: " return b == 2u32 == y;"
span:
line_start: 11
line_stop: 16
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 16
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" foo: u32;\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar() -> u32 {\\\"}\"}"
input: []
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "1"
- line_start: 7
line_stop: 7
col_start: 16
col_stop: 20
path: compiler-test
content: " return 1u32;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 20
path: compiler-test
content: " return 1u32;"
span:
line_start: 6
line_stop: 8
col_start: 27
col_stop: 6
path: compiler-test
content: " function bar() -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar() -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { foo: 1 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { foo: 1 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { foo: 1 };\\\"}\"}"
members:
- identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { foo: 1 };\\\"}\"}"
expression:
Value:
Implicit:
- "1"
- line_start: 12
line_stop: 12
col_start: 26
col_stop: 27
path: compiler-test
content: " const a = Foo { foo: 1 };"
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 29
path: compiler-test
content: " const a = Foo { foo: 1 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 29
path: compiler-test
content: " const a = Foo { foo: 1 };"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = a.foo + Foo::bar();"
type_: ~
value:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
name: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 20
path: compiler-test
content: " const b = a.foo + Foo::bar();"
right:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":28,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 23
col_stop: 31
path: compiler-test
content: " const b = a.foo + Foo::bar();"
arguments: []
span:
line_start: 13
line_stop: 13
col_start: 23
col_stop: 33
path: compiler-test
content: " const b = a.foo + Foo::bar();"
op: Add
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 33
path: compiler-test
content: " const b = a.foo + Foo::bar();"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 33
path: compiler-test
content: " const b = a.foo + Foo::bar();"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == 2u32 == y;\\\"}\"}"
right:
Value:
Integer:
- U32
- "2"
- line_start: 15
line_stop: 15
col_start: 17
col_stop: 21
path: compiler-test
content: " return b == 2u32 == y;"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 21
path: compiler-test
content: " return b == 2u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == 2u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 26
path: compiler-test
content: " return b == 2u32 == y;"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 26
path: compiler-test
content: " return b == 2u32 == y;"
span:
line_start: 11
line_stop: 16
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 16
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" foo: u32;\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar() -> u32 {\\\"}\"}"
input: []
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "1"
- line_start: 7
line_stop: 7
col_start: 16
col_stop: 20
path: compiler-test
content: " return 1u32;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 20
path: compiler-test
content: " return 1u32;"
span:
line_start: 6
line_stop: 8
col_start: 27
col_stop: 6
path: compiler-test
content: " function bar() -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar() -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { foo: 1 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { foo: 1 };"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { foo: 1 };\\\"}\"}"
members:
- identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { foo: 1 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "1"
- line_start: 12
line_stop: 12
col_start: 26
col_stop: 27
path: compiler-test
content: " const a = Foo { foo: 1 };"
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 29
path: compiler-test
content: " const a = Foo { foo: 1 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 29
path: compiler-test
content: " const a = Foo { foo: 1 };"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = a.foo + Foo::bar();"
type_:
IntegerType: U32
value:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
name: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 20
path: compiler-test
content: " const b = a.foo + Foo::bar();"
right:
Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":28,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.foo + Foo::bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 23
col_stop: 31
path: compiler-test
content: " const b = a.foo + Foo::bar();"
arguments: []
span:
line_start: 13
line_stop: 13
col_start: 23
col_stop: 33
path: compiler-test
content: " const b = a.foo + Foo::bar();"
op: Add
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 33
path: compiler-test
content: " const b = a.foo + Foo::bar();"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 33
path: compiler-test
content: " const b = a.foo + Foo::bar();"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == 2u32 == y;\\\"}\"}"
right:
Value:
Integer:
- U32
- "2"
- line_start: 15
line_stop: 15
col_start: 17
col_stop: 21
path: compiler-test
content: " return b == 2u32 == y;"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 21
path: compiler-test
content: " return b == 2u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == 2u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 26
path: compiler-test
content: " return b == 2u32 == y;"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 26
path: compiler-test
content: " return b == 2u32 == y;"
span:
line_start: 11
line_stop: 16
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 16
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"

View File

@ -16,3 +16,843 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u8;\\\"}\"}"
- IntegerType: U8
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, new: u8) {\\\"}\"}"
input:
- MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, new: u8) {\\\"}\"}"
- Variable:
identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":30,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, new: u8) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U8
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 33
path: compiler-test
content: " function set_a(mut self, new: u8) {"
output: ~
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}"
accesses:
- Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 15
path: compiler-test
content: " self.a = new;"
value:
Identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 21
path: compiler-test
content: " self.a = new;"
span:
line_start: 6
line_stop: 8
col_start: 39
col_stop: 6
path: compiler-test
content: " function set_a(mut self, new: u8) {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function set_a(mut self, new: u8) {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { a: 0u8 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
expression:
Value:
Integer:
- U8
- "0"
- line_start: 12
line_stop: 12
col_start: 22
col_stop: 25
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 12
line_stop: 12
col_start: 13
col_stop: 27
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 27
path: compiler-test
content: " let f = Foo { a: 0u8 };"
- Expression:
expression:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(1u8);\\\"}\"}"
name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(1u8);\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 12
path: compiler-test
content: " f.set_a(1u8);"
arguments:
- Value:
Integer:
- U8
- "1"
- line_start: 14
line_stop: 14
col_start: 13
col_stop: 16
path: compiler-test
content: " f.set_a(1u8);"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 17
path: compiler-test
content: " f.set_a(1u8);"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 17
path: compiler-test
content: " f.set_a(1u8);"
- Expression:
expression:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(2u8);\\\"}\"}"
name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(2u8);\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 12
path: compiler-test
content: " f.set_a(2u8);"
arguments:
- Value:
Integer:
- U8
- "2"
- line_start: 15
line_stop: 15
col_start: 13
col_stop: 16
path: compiler-test
content: " f.set_a(2u8);"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 17
path: compiler-test
content: " f.set_a(2u8);"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 17
path: compiler-test
content: " f.set_a(2u8);"
- Return:
expression:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}"
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}"
span:
line_start: 17
line_stop: 17
col_start: 12
col_stop: 15
path: compiler-test
content: " return f.a == 2u8 == y;"
right:
Value:
Integer:
- U8
- "2"
- line_start: 17
line_stop: 17
col_start: 19
col_stop: 22
path: compiler-test
content: " return f.a == 2u8 == y;"
op: Eq
span:
line_start: 17
line_stop: 17
col_start: 12
col_stop: 22
path: compiler-test
content: " return f.a == 2u8 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}"
op: Eq
span:
line_start: 17
line_stop: 17
col_start: 12
col_stop: 27
path: compiler-test
content: " return f.a == 2u8 == y;"
span:
line_start: 17
line_stop: 17
col_start: 5
col_stop: 27
path: compiler-test
content: " return f.a == 2u8 == y;"
span:
line_start: 11
line_stop: 18
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 18
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u8;\\\"}\"}"
- IntegerType: U8
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, new: u8) {\\\"}\"}"
input:
- MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, new: u8) {\\\"}\"}"
- Variable:
identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":30,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, new: u8) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U8
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 33
path: compiler-test
content: " function set_a(mut self, new: u8) {"
output:
Tuple: []
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}"
accesses:
- Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 15
path: compiler-test
content: " self.a = new;"
value:
Identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 21
path: compiler-test
content: " self.a = new;"
span:
line_start: 6
line_stop: 8
col_start: 39
col_stop: 6
path: compiler-test
content: " function set_a(mut self, new: u8) {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function set_a(mut self, new: u8) {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { a: 0u8 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
expression:
Value:
Integer:
- U8
- "0"
- line_start: 12
line_stop: 12
col_start: 22
col_stop: 25
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 12
line_stop: 12
col_start: 13
col_stop: 27
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 27
path: compiler-test
content: " let f = Foo { a: 0u8 };"
- Expression:
expression:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(1u8);\\\"}\"}"
name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(1u8);\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 12
path: compiler-test
content: " f.set_a(1u8);"
arguments:
- Value:
Integer:
- U8
- "1"
- line_start: 14
line_stop: 14
col_start: 13
col_stop: 16
path: compiler-test
content: " f.set_a(1u8);"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 17
path: compiler-test
content: " f.set_a(1u8);"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 17
path: compiler-test
content: " f.set_a(1u8);"
- Expression:
expression:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(2u8);\\\"}\"}"
name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(2u8);\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 12
path: compiler-test
content: " f.set_a(2u8);"
arguments:
- Value:
Integer:
- U8
- "2"
- line_start: 15
line_stop: 15
col_start: 13
col_stop: 16
path: compiler-test
content: " f.set_a(2u8);"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 17
path: compiler-test
content: " f.set_a(2u8);"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 17
path: compiler-test
content: " f.set_a(2u8);"
- Return:
expression:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}"
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}"
span:
line_start: 17
line_stop: 17
col_start: 12
col_stop: 15
path: compiler-test
content: " return f.a == 2u8 == y;"
right:
Value:
Integer:
- U8
- "2"
- line_start: 17
line_stop: 17
col_start: 19
col_stop: 22
path: compiler-test
content: " return f.a == 2u8 == y;"
op: Eq
span:
line_start: 17
line_stop: 17
col_start: 12
col_stop: 22
path: compiler-test
content: " return f.a == 2u8 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}"
op: Eq
span:
line_start: 17
line_stop: 17
col_start: 12
col_stop: 27
path: compiler-test
content: " return f.a == 2u8 == y;"
span:
line_start: 17
line_stop: 17
col_start: 5
col_stop: 27
path: compiler-test
content: " return f.a == 2u8 == y;"
span:
line_start: 11
line_stop: 18
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 18
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u8;\\\"}\"}"
- IntegerType: U8
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, new: u8) {\\\"}\"}"
input:
- MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, new: u8) {\\\"}\"}"
- Variable:
identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":30,\\\"col_stop\\\":33,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function set_a(mut self, new: u8) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U8
span:
line_start: 6
line_stop: 6
col_start: 30
col_stop: 33
path: compiler-test
content: " function set_a(mut self, new: u8) {"
output:
Tuple: []
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}"
accesses:
- Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 15
path: compiler-test
content: " self.a = new;"
value:
Identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = new;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 21
path: compiler-test
content: " self.a = new;"
span:
line_start: 6
line_stop: 8
col_start: 39
col_stop: 6
path: compiler-test
content: " function set_a(mut self, new: u8) {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function set_a(mut self, new: u8) {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { a: 0u8 };"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
expression:
Value:
Integer:
- U8
- "0"
- line_start: 12
line_stop: 12
col_start: 22
col_stop: 25
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 12
line_stop: 12
col_start: 13
col_stop: 27
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 27
path: compiler-test
content: " let f = Foo { a: 0u8 };"
- Expression:
expression:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(1u8);\\\"}\"}"
name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(1u8);\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 12
path: compiler-test
content: " f.set_a(1u8);"
arguments:
- Value:
Integer:
- U8
- "1"
- line_start: 14
line_stop: 14
col_start: 13
col_stop: 16
path: compiler-test
content: " f.set_a(1u8);"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 17
path: compiler-test
content: " f.set_a(1u8);"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 17
path: compiler-test
content: " f.set_a(1u8);"
- Expression:
expression:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(2u8);\\\"}\"}"
name: "{\"name\":\"set_a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.set_a(2u8);\\\"}\"}"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 12
path: compiler-test
content: " f.set_a(2u8);"
arguments:
- Value:
Integer:
- U8
- "2"
- line_start: 15
line_stop: 15
col_start: 13
col_stop: 16
path: compiler-test
content: " f.set_a(2u8);"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 17
path: compiler-test
content: " f.set_a(2u8);"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 17
path: compiler-test
content: " f.set_a(2u8);"
- Return:
expression:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}"
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}"
span:
line_start: 17
line_stop: 17
col_start: 12
col_stop: 15
path: compiler-test
content: " return f.a == 2u8 == y;"
right:
Value:
Integer:
- U8
- "2"
- line_start: 17
line_stop: 17
col_start: 19
col_stop: 22
path: compiler-test
content: " return f.a == 2u8 == y;"
op: Eq
span:
line_start: 17
line_stop: 17
col_start: 12
col_stop: 22
path: compiler-test
content: " return f.a == 2u8 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == y;\\\"}\"}"
op: Eq
span:
line_start: 17
line_stop: 17
col_start: 12
col_stop: 27
path: compiler-test
content: " return f.a == 2u8 == y;"
span:
line_start: 17
line_stop: 17
col_start: 5
col_stop: 27
path: compiler-test
content: " return f.a == 2u8 == y;"
span:
line_start: 11
line_stop: 18
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 18
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n"

View File

@ -16,3 +16,696 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u32;\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(mut self) {\\\"}\"}"
input:
- MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":18,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(mut self) {\\\"}\"}"
output: ~
block:
statements:
- Conditional:
condition:
Value:
Boolean:
- "true"
- line_start: 15
line_stop: 15
col_start: 12
col_stop: 16
path: compiler-test
content: " if true {"
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = 5u32; // Mutating a variable inside a conditional statement should work.\\\"}\"}"
accesses:
- Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = 5u32; // Mutating a variable inside a conditional statement should work.\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 13
col_stop: 19
path: compiler-test
content: " self.a = 5u32; // Mutating a variable inside a conditional statement should work."
value:
Value:
Integer:
- U32
- "5"
- line_start: 16
line_stop: 16
col_start: 22
col_stop: 26
path: compiler-test
content: " self.a = 5u32; // Mutating a variable inside a conditional statement should work."
span:
line_start: 16
line_stop: 16
col_start: 13
col_stop: 26
path: compiler-test
content: " self.a = 5u32; // Mutating a variable inside a conditional statement should work."
span:
line_start: 15
line_stop: 17
col_start: 17
col_stop: 10
path: compiler-test
content: " if true {\n...\n }"
next: ~
span:
line_start: 15
line_stop: 17
col_start: 9
col_stop: 10
path: compiler-test
content: " if true {\n...\n }"
span:
line_start: 14
line_stop: 18
col_start: 28
col_stop: 6
path: compiler-test
content: " function bar(mut self) {\n...\n }"
span:
line_start: 14
line_stop: 18
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar(mut self) {\n...\n }\n\n"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u32 };\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { a: 0u32 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 26
path: compiler-test
content: " let f = Foo { a: 0u32 };"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 28
path: compiler-test
content: " let f = Foo { a: 0u32 };"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 28
path: compiler-test
content: " let f = Foo { a: 0u32 };"
- Expression:
expression:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.bar();\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.bar();\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 10
path: compiler-test
content: " f.bar();"
arguments: []
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 12
path: compiler-test
content: " f.bar();"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 12
path: compiler-test
content: " f.bar();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 8
line_stop: 8
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u32;\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(mut self) {\\\"}\"}"
input:
- MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":18,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(mut self) {\\\"}\"}"
output:
Tuple: []
block:
statements:
- Conditional:
condition:
Value:
Boolean:
- "true"
- line_start: 15
line_stop: 15
col_start: 12
col_stop: 16
path: compiler-test
content: " if true {"
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = 5u32; // Mutating a variable inside a conditional statement should work.\\\"}\"}"
accesses:
- Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = 5u32; // Mutating a variable inside a conditional statement should work.\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 13
col_stop: 19
path: compiler-test
content: " self.a = 5u32; // Mutating a variable inside a conditional statement should work."
value:
Value:
Integer:
- U32
- "5"
- line_start: 16
line_stop: 16
col_start: 22
col_stop: 26
path: compiler-test
content: " self.a = 5u32; // Mutating a variable inside a conditional statement should work."
span:
line_start: 16
line_stop: 16
col_start: 13
col_stop: 26
path: compiler-test
content: " self.a = 5u32; // Mutating a variable inside a conditional statement should work."
span:
line_start: 15
line_stop: 17
col_start: 17
col_stop: 10
path: compiler-test
content: " if true {\n...\n }"
next: ~
span:
line_start: 15
line_stop: 17
col_start: 9
col_stop: 10
path: compiler-test
content: " if true {\n...\n }"
span:
line_start: 14
line_stop: 18
col_start: 28
col_stop: 6
path: compiler-test
content: " function bar(mut self) {\n...\n }"
span:
line_start: 14
line_stop: 18
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar(mut self) {\n...\n }\n\n"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u32 };\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { a: 0u32 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 26
path: compiler-test
content: " let f = Foo { a: 0u32 };"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 28
path: compiler-test
content: " let f = Foo { a: 0u32 };"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 28
path: compiler-test
content: " let f = Foo { a: 0u32 };"
- Expression:
expression:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.bar();\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.bar();\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 10
path: compiler-test
content: " f.bar();"
arguments: []
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 12
path: compiler-test
content: " f.bar();"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 12
path: compiler-test
content: " f.bar();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 8
line_stop: 8
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u32;\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(mut self) {\\\"}\"}"
input:
- MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":18,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(mut self) {\\\"}\"}"
output:
Tuple: []
block:
statements:
- Conditional:
condition:
Value:
Boolean:
- "true"
- line_start: 15
line_stop: 15
col_start: 12
col_stop: 16
path: compiler-test
content: " if true {"
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = 5u32; // Mutating a variable inside a conditional statement should work.\\\"}\"}"
accesses:
- Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" self.a = 5u32; // Mutating a variable inside a conditional statement should work.\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 13
col_stop: 19
path: compiler-test
content: " self.a = 5u32; // Mutating a variable inside a conditional statement should work."
value:
Value:
Integer:
- U32
- "5"
- line_start: 16
line_stop: 16
col_start: 22
col_stop: 26
path: compiler-test
content: " self.a = 5u32; // Mutating a variable inside a conditional statement should work."
span:
line_start: 16
line_stop: 16
col_start: 13
col_stop: 26
path: compiler-test
content: " self.a = 5u32; // Mutating a variable inside a conditional statement should work."
span:
line_start: 15
line_stop: 17
col_start: 17
col_stop: 10
path: compiler-test
content: " if true {\n...\n }"
next: ~
span:
line_start: 15
line_stop: 17
col_start: 9
col_stop: 10
path: compiler-test
content: " if true {\n...\n }"
span:
line_start: 14
line_stop: 18
col_start: 28
col_stop: 6
path: compiler-test
content: " function bar(mut self) {\n...\n }"
span:
line_start: 14
line_stop: 18
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar(mut self) {\n...\n }\n\n"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u32 };\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { a: 0u32 };"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "0"
- line_start: 4
line_stop: 4
col_start: 22
col_stop: 26
path: compiler-test
content: " let f = Foo { a: 0u32 };"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 28
path: compiler-test
content: " let f = Foo { a: 0u32 };"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 28
path: compiler-test
content: " let f = Foo { a: 0u32 };"
- Expression:
expression:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.bar();\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.bar();\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 10
path: compiler-test
content: " f.bar();"
arguments: []
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 12
path: compiler-test
content: " f.bar();"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 12
path: compiler-test
content: " f.bar();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 8
line_stop: 8
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n"

View File

@ -16,3 +16,640 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u8;\\\"}\"}"
- IntegerType: U8
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { a: 0u8 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
expression:
Value:
Integer:
- U8
- "0"
- line_start: 8
line_stop: 8
col_start: 22
col_stop: 25
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 8
line_stop: 8
col_start: 13
col_stop: 27
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 27
path: compiler-test
content: " let f = Foo { a: 0u8 };"
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.a = 1u8;\\\"}\"}"
accesses:
- Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.a = 1u8;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 8
path: compiler-test
content: " f.a = 1u8;"
value:
Value:
Integer:
- U8
- "1"
- line_start: 10
line_stop: 10
col_start: 11
col_stop: 14
path: compiler-test
content: " f.a = 1u8;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 14
path: compiler-test
content: " f.a = 1u8;"
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.a = 2u8;\\\"}\"}"
accesses:
- Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.a = 2u8;\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 5
col_stop: 8
path: compiler-test
content: " f.a = 2u8;"
value:
Value:
Integer:
- U8
- "2"
- line_start: 11
line_stop: 11
col_start: 11
col_stop: 14
path: compiler-test
content: " f.a = 2u8;"
span:
line_start: 11
line_stop: 11
col_start: 5
col_stop: 14
path: compiler-test
content: " f.a = 2u8;"
- Return:
expression:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == true;\\\"}\"}"
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == true;\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 12
col_stop: 15
path: compiler-test
content: " return f.a == 2u8 == true;"
right:
Value:
Integer:
- U8
- "2"
- line_start: 13
line_stop: 13
col_start: 19
col_stop: 22
path: compiler-test
content: " return f.a == 2u8 == true;"
op: Eq
span:
line_start: 13
line_stop: 13
col_start: 12
col_stop: 22
path: compiler-test
content: " return f.a == 2u8 == true;"
right:
Value:
Boolean:
- "true"
- line_start: 13
line_stop: 13
col_start: 26
col_stop: 30
path: compiler-test
content: " return f.a == 2u8 == true;"
op: Eq
span:
line_start: 13
line_stop: 13
col_start: 12
col_stop: 30
path: compiler-test
content: " return f.a == 2u8 == true;"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 30
path: compiler-test
content: " return f.a == 2u8 == true;"
span:
line_start: 7
line_stop: 14
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 14
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u8;\\\"}\"}"
- IntegerType: U8
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { a: 0u8 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
expression:
Value:
Integer:
- U8
- "0"
- line_start: 8
line_stop: 8
col_start: 22
col_stop: 25
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 8
line_stop: 8
col_start: 13
col_stop: 27
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 27
path: compiler-test
content: " let f = Foo { a: 0u8 };"
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.a = 1u8;\\\"}\"}"
accesses:
- Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.a = 1u8;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 8
path: compiler-test
content: " f.a = 1u8;"
value:
Value:
Integer:
- U8
- "1"
- line_start: 10
line_stop: 10
col_start: 11
col_stop: 14
path: compiler-test
content: " f.a = 1u8;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 14
path: compiler-test
content: " f.a = 1u8;"
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.a = 2u8;\\\"}\"}"
accesses:
- Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.a = 2u8;\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 5
col_stop: 8
path: compiler-test
content: " f.a = 2u8;"
value:
Value:
Integer:
- U8
- "2"
- line_start: 11
line_stop: 11
col_start: 11
col_stop: 14
path: compiler-test
content: " f.a = 2u8;"
span:
line_start: 11
line_stop: 11
col_start: 5
col_stop: 14
path: compiler-test
content: " f.a = 2u8;"
- Return:
expression:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == true;\\\"}\"}"
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == true;\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 12
col_stop: 15
path: compiler-test
content: " return f.a == 2u8 == true;"
right:
Value:
Integer:
- U8
- "2"
- line_start: 13
line_stop: 13
col_start: 19
col_stop: 22
path: compiler-test
content: " return f.a == 2u8 == true;"
op: Eq
span:
line_start: 13
line_stop: 13
col_start: 12
col_stop: 22
path: compiler-test
content: " return f.a == 2u8 == true;"
right:
Value:
Boolean:
- "true"
- line_start: 13
line_stop: 13
col_start: 26
col_stop: 30
path: compiler-test
content: " return f.a == 2u8 == true;"
op: Eq
span:
line_start: 13
line_stop: 13
col_start: 12
col_stop: 30
path: compiler-test
content: " return f.a == 2u8 == true;"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 30
path: compiler-test
content: " return f.a == 2u8 == true;"
span:
line_start: 7
line_stop: 14
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 14
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u8;\\\"}\"}"
- IntegerType: U8
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 9
col_stop: 10
path: compiler-test
content: " let f = Foo { a: 0u8 };"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
members:
- identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let f = Foo { a: 0u8 };\\\"}\"}"
expression:
Value:
Integer:
- U8
- "0"
- line_start: 8
line_stop: 8
col_start: 22
col_stop: 25
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 8
line_stop: 8
col_start: 13
col_stop: 27
path: compiler-test
content: " let f = Foo { a: 0u8 };"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 27
path: compiler-test
content: " let f = Foo { a: 0u8 };"
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.a = 1u8;\\\"}\"}"
accesses:
- Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.a = 1u8;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 8
path: compiler-test
content: " f.a = 1u8;"
value:
Value:
Integer:
- U8
- "1"
- line_start: 10
line_stop: 10
col_start: 11
col_stop: 14
path: compiler-test
content: " f.a = 1u8;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 14
path: compiler-test
content: " f.a = 1u8;"
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.a = 2u8;\\\"}\"}"
accesses:
- Member: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f.a = 2u8;\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 5
col_stop: 8
path: compiler-test
content: " f.a = 2u8;"
value:
Value:
Integer:
- U8
- "2"
- line_start: 11
line_stop: 11
col_start: 11
col_stop: 14
path: compiler-test
content: " f.a = 2u8;"
span:
line_start: 11
line_stop: 11
col_start: 5
col_stop: 14
path: compiler-test
content: " f.a = 2u8;"
- Return:
expression:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == true;\\\"}\"}"
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return f.a == 2u8 == true;\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 12
col_stop: 15
path: compiler-test
content: " return f.a == 2u8 == true;"
right:
Value:
Integer:
- U8
- "2"
- line_start: 13
line_stop: 13
col_start: 19
col_stop: 22
path: compiler-test
content: " return f.a == 2u8 == true;"
op: Eq
span:
line_start: 13
line_stop: 13
col_start: 12
col_stop: 22
path: compiler-test
content: " return f.a == 2u8 == true;"
right:
Value:
Boolean:
- "true"
- line_start: 13
line_stop: 13
col_start: 26
col_stop: 30
path: compiler-test
content: " return f.a == 2u8 == true;"
op: Eq
span:
line_start: 13
line_stop: 13
col_start: 12
col_stop: 30
path: compiler-test
content: " return f.a == 2u8 == true;"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 30
path: compiler-test
content: " return f.a == 2u8 == true;"
span:
line_start: 7
line_stop: 14
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 14
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n"

View File

@ -16,3 +16,656 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f: u32;\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(self) -> u32 {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(self) -> u32 {\\\"}\"}"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.f;\\\"}\"}"
name: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.f;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 22
path: compiler-test
content: " return self.f;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 22
path: compiler-test
content: " return self.f;"
span:
line_start: 6
line_stop: 8
col_start: 31
col_stop: 6
path: compiler-test
content: " function bar(self) -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar(self) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { f: 1u32 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { f: 1u32 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { f: 1u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { f: 1u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "1"
- line_start: 12
line_stop: 12
col_start: 24
col_stop: 28
path: compiler-test
content: " const a = Foo { f: 1u32 };"
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 30
path: compiler-test
content: " const a = Foo { f: 1u32 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 30
path: compiler-test
content: " const a = Foo { f: 1u32 };"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = a.bar();"
type_: ~
value:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.bar();\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 20
path: compiler-test
content: " const b = a.bar();"
arguments: []
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 22
path: compiler-test
content: " const b = a.bar();"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 22
path: compiler-test
content: " const b = a.bar();"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == 1u32 == y;\\\"}\"}"
right:
Value:
Integer:
- U32
- "1"
- line_start: 15
line_stop: 15
col_start: 17
col_stop: 21
path: compiler-test
content: " return b == 1u32 == y;"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 21
path: compiler-test
content: " return b == 1u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == 1u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 26
path: compiler-test
content: " return b == 1u32 == y;"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 26
path: compiler-test
content: " return b == 1u32 == y;"
span:
line_start: 11
line_stop: 16
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 16
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f: u32;\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(self) -> u32 {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(self) -> u32 {\\\"}\"}"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.f;\\\"}\"}"
name: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.f;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 22
path: compiler-test
content: " return self.f;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 22
path: compiler-test
content: " return self.f;"
span:
line_start: 6
line_stop: 8
col_start: 31
col_stop: 6
path: compiler-test
content: " function bar(self) -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar(self) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { f: 1u32 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { f: 1u32 };"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { f: 1u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { f: 1u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "1"
- line_start: 12
line_stop: 12
col_start: 24
col_stop: 28
path: compiler-test
content: " const a = Foo { f: 1u32 };"
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 30
path: compiler-test
content: " const a = Foo { f: 1u32 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 30
path: compiler-test
content: " const a = Foo { f: 1u32 };"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = a.bar();"
type_: ~
value:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.bar();\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 20
path: compiler-test
content: " const b = a.bar();"
arguments: []
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 22
path: compiler-test
content: " const b = a.bar();"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 22
path: compiler-test
content: " const b = a.bar();"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == 1u32 == y;\\\"}\"}"
right:
Value:
Integer:
- U32
- "1"
- line_start: 15
line_stop: 15
col_start: 17
col_stop: 21
path: compiler-test
content: " return b == 1u32 == y;"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 21
path: compiler-test
content: " return b == 1u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == 1u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 26
path: compiler-test
content: " return b == 1u32 == y;"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 26
path: compiler-test
content: " return b == 1u32 == y;"
span:
line_start: 11
line_stop: 16
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 16
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" f: u32;\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(self) -> u32 {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" function bar(self) -> u32 {\\\"}\"}"
output:
IntegerType: U32
block:
statements:
- Return:
expression:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.f;\\\"}\"}"
name: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return self.f;\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 16
col_stop: 22
path: compiler-test
content: " return self.f;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 22
path: compiler-test
content: " return self.f;"
span:
line_start: 6
line_stop: 8
col_start: 31
col_stop: 6
path: compiler-test
content: " function bar(self) -> u32 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " function bar(self) -> u32 {\n...\n }"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { f: 1u32 };\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = Foo { f: 1u32 };"
type_:
Circuit: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
value:
CircuitInit:
name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { f: 1u32 };\\\"}\"}"
members:
- identifier: "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = Foo { f: 1u32 };\\\"}\"}"
expression:
Value:
Integer:
- U32
- "1"
- line_start: 12
line_stop: 12
col_start: 24
col_stop: 28
path: compiler-test
content: " const a = Foo { f: 1u32 };"
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 30
path: compiler-test
content: " const a = Foo { f: 1u32 };"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 30
path: compiler-test
content: " const a = Foo { f: 1u32 };"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = a.bar();"
type_:
IntegerType: U32
value:
Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.bar();\\\"}\"}"
name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = a.bar();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 20
path: compiler-test
content: " const b = a.bar();"
arguments: []
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 22
path: compiler-test
content: " const b = a.bar();"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 22
path: compiler-test
content: " const b = a.bar();"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == 1u32 == y;\\\"}\"}"
right:
Value:
Integer:
- U32
- "1"
- line_start: 15
line_stop: 15
col_start: 17
col_stop: 21
path: compiler-test
content: " return b == 1u32 == y;"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 21
path: compiler-test
content: " return b == 1u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return b == 1u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 26
path: compiler-test
content: " return b == 1u32 == y;"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 26
path: compiler-test
content: " return b == 1u32 == y;"
span:
line_start: 11
line_stop: 16
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 16
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"

View File

@ -16,3 +16,306 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Assert:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == true);\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 25
col_stop: 29
path: compiler-test
content: " console.assert(a == true);"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 20
col_stop: 29
path: compiler-test
content: " console.assert(a == true);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 29
path: compiler-test
content: " console.assert(a == true);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return a == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Assert:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == true);\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 25
col_stop: 29
path: compiler-test
content: " console.assert(a == true);"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 20
col_stop: 29
path: compiler-test
content: " console.assert(a == true);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 29
path: compiler-test
content: " console.assert(a == true);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return a == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Assert:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == true);\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 25
col_stop: 29
path: compiler-test
content: " console.assert(a == true);"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 20
col_stop: 29
path: compiler-test
content: " console.assert(a == true);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 29
path: compiler-test
content: " console.assert(a == true);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return a == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}\n"

View File

@ -16,3 +16,398 @@ outputs:
- input_file: cond_2.in
output:
registers: {}
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool) {"
output: ~
block:
statements:
- Conditional:
condition:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if a {\\\"}\"}"
block:
statements:
- Console:
function:
Assert:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == true);\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 29
col_stop: 33
path: compiler-test
content: " console.assert(a == true);"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 24
col_stop: 33
path: compiler-test
content: " console.assert(a == true);"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 33
path: compiler-test
content: " console.assert(a == true);"
span:
line_start: 4
line_stop: 6
col_start: 10
col_stop: 6
path: compiler-test
content: " if a {\n...\n } else {"
next:
Block:
statements:
- Console:
function:
Assert:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == false);\\\"}\"}"
right:
Value:
Boolean:
- "false"
- line_start: 7
line_stop: 7
col_start: 29
col_stop: 34
path: compiler-test
content: " console.assert(a == false);"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 24
col_stop: 34
path: compiler-test
content: " console.assert(a == false);"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 34
path: compiler-test
content: " console.assert(a == false);"
span:
line_start: 6
line_stop: 8
col_start: 12
col_stop: 6
path: compiler-test
content: " } else {\n...\n }"
span:
line_start: 4
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " if a {\n...\n } else {\n...\n }"
span:
line_start: 3
line_stop: 9
col_start: 24
col_stop: 2
path: compiler-test
content: "function main(a: bool) {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool) {\n...\n}\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool) {"
output:
Tuple: []
block:
statements:
- Conditional:
condition:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if a {\\\"}\"}"
block:
statements:
- Console:
function:
Assert:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == true);\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 29
col_stop: 33
path: compiler-test
content: " console.assert(a == true);"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 24
col_stop: 33
path: compiler-test
content: " console.assert(a == true);"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 33
path: compiler-test
content: " console.assert(a == true);"
span:
line_start: 4
line_stop: 6
col_start: 10
col_stop: 6
path: compiler-test
content: " if a {\n...\n } else {"
next:
Block:
statements:
- Console:
function:
Assert:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == false);\\\"}\"}"
right:
Value:
Boolean:
- "false"
- line_start: 7
line_stop: 7
col_start: 29
col_stop: 34
path: compiler-test
content: " console.assert(a == false);"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 24
col_stop: 34
path: compiler-test
content: " console.assert(a == false);"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 34
path: compiler-test
content: " console.assert(a == false);"
span:
line_start: 6
line_stop: 8
col_start: 12
col_stop: 6
path: compiler-test
content: " } else {\n...\n }"
span:
line_start: 4
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " if a {\n...\n } else {\n...\n }"
span:
line_start: 3
line_stop: 9
col_start: 24
col_stop: 2
path: compiler-test
content: "function main(a: bool) {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool) {\n...\n}\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool) {"
output:
Tuple: []
block:
statements:
- Conditional:
condition:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if a {\\\"}\"}"
block:
statements:
- Console:
function:
Assert:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == true);\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 29
col_stop: 33
path: compiler-test
content: " console.assert(a == true);"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 24
col_stop: 33
path: compiler-test
content: " console.assert(a == true);"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 33
path: compiler-test
content: " console.assert(a == true);"
span:
line_start: 4
line_stop: 6
col_start: 10
col_stop: 6
path: compiler-test
content: " if a {\n...\n } else {"
next:
Block:
statements:
- Console:
function:
Assert:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.assert(a == false);\\\"}\"}"
right:
Value:
Boolean:
- "false"
- line_start: 7
line_stop: 7
col_start: 29
col_stop: 34
path: compiler-test
content: " console.assert(a == false);"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 24
col_stop: 34
path: compiler-test
content: " console.assert(a == false);"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 34
path: compiler-test
content: " console.assert(a == false);"
span:
line_start: 6
line_stop: 8
col_start: 12
col_stop: 6
path: compiler-test
content: " } else {\n...\n }"
span:
line_start: 4
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " if a {\n...\n } else {\n...\n }"
span:
line_start: 3
line_stop: 9
col_start: 24
col_stop: 2
path: compiler-test
content: "function main(a: bool) {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool) {\n...\n}\n\n\n\n"

View File

@ -16,3 +16,273 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Debug:
parts:
- Const: hello debug
parameters: []
span:
line_start: 4
line_stop: 4
col_start: 19
col_stop: 32
path: compiler-test
content: " console.debug(\"hello debug\");"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 32
path: compiler-test
content: " console.debug(\"hello debug\");"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Debug:
parts:
- Const: hello debug
parameters: []
span:
line_start: 4
line_stop: 4
col_start: 19
col_stop: 32
path: compiler-test
content: " console.debug(\"hello debug\");"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 32
path: compiler-test
content: " console.debug(\"hello debug\");"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Debug:
parts:
- Const: hello debug
parameters: []
span:
line_start: 4
line_stop: 4
col_start: 19
col_stop: 32
path: compiler-test
content: " console.debug(\"hello debug\");"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 32
path: compiler-test
content: " console.debug(\"hello debug\");"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"

View File

@ -16,3 +16,273 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Error:
parts:
- Const: hello error
parameters: []
span:
line_start: 4
line_stop: 4
col_start: 19
col_stop: 32
path: compiler-test
content: " console.error(\"hello error\");"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 32
path: compiler-test
content: " console.error(\"hello error\");"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Error:
parts:
- Const: hello error
parameters: []
span:
line_start: 4
line_stop: 4
col_start: 19
col_stop: 32
path: compiler-test
content: " console.error(\"hello error\");"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 32
path: compiler-test
content: " console.error(\"hello error\");"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Error:
parts:
- Const: hello error
parameters: []
span:
line_start: 4
line_stop: 4
col_start: 19
col_stop: 32
path: compiler-test
content: " console.error(\"hello error\");"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 32
path: compiler-test
content: " console.error(\"hello error\");"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"

View File

@ -16,3 +16,273 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Log:
parts:
- Const: hello world
parameters: []
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " console.log(\"hello world\");"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " console.log(\"hello world\");"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Log:
parts:
- Const: hello world
parameters: []
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " console.log(\"hello world\");"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " console.log(\"hello world\");"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Log:
parts:
- Const: hello world
parameters: []
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 30
path: compiler-test
content: " console.log(\"hello world\");"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 30
path: compiler-test
content: " console.log(\"hello world\");"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"

View File

@ -22,3 +22,402 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32, b: u32) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 4
line_stop: 4
col_start: 23
col_stop: 24
path: compiler-test
content: "function main(a: u32, b: u32) -> bool {"
output: Boolean
block:
statements:
- Conditional:
condition:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if a == b {\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if a == b {\\\"}\"}"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 8
col_stop: 14
path: compiler-test
content: " if a == b {"
block:
statements:
- Console:
function:
Log:
parts:
- Const: ""
- Container
- Const: "=="
- Container
parameters:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}=={}\\\\\\\", a, b); // This line should not fail.\\\"}\"}"
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}=={}\\\\\\\", a, b); // This line should not fail.\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 21
col_stop: 35
path: compiler-test
content: " console.log(\"{}=={}\", a, b); // This line should not fail."
span:
line_start: 6
line_stop: 6
col_start: 9
col_stop: 35
path: compiler-test
content: " console.log(\"{}=={}\", a, b); // This line should not fail."
span:
line_start: 5
line_stop: 7
col_start: 15
col_stop: 6
path: compiler-test
content: " if a == b {\n...\n }"
next: ~
span:
line_start: 5
line_stop: 7
col_start: 5
col_stop: 6
path: compiler-test
content: " if a == b {\n...\n }"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 4
line_stop: 10
col_start: 39
col_stop: 2
path: compiler-test
content: "function main(a: u32, b: u32) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 10
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32, b: u32) -> bool {\n...\n}\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32, b: u32) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 4
line_stop: 4
col_start: 23
col_stop: 24
path: compiler-test
content: "function main(a: u32, b: u32) -> bool {"
output: Boolean
block:
statements:
- Conditional:
condition:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if a == b {\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if a == b {\\\"}\"}"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 8
col_stop: 14
path: compiler-test
content: " if a == b {"
block:
statements:
- Console:
function:
Log:
parts:
- Const: ""
- Container
- Const: "=="
- Container
parameters:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}=={}\\\\\\\", a, b); // This line should not fail.\\\"}\"}"
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}=={}\\\\\\\", a, b); // This line should not fail.\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 21
col_stop: 35
path: compiler-test
content: " console.log(\"{}=={}\", a, b); // This line should not fail."
span:
line_start: 6
line_stop: 6
col_start: 9
col_stop: 35
path: compiler-test
content: " console.log(\"{}=={}\", a, b); // This line should not fail."
span:
line_start: 5
line_stop: 7
col_start: 15
col_stop: 6
path: compiler-test
content: " if a == b {\n...\n }"
next: ~
span:
line_start: 5
line_stop: 7
col_start: 5
col_stop: 6
path: compiler-test
content: " if a == b {\n...\n }"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 4
line_stop: 10
col_start: 39
col_stop: 2
path: compiler-test
content: "function main(a: u32, b: u32) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 10
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32, b: u32) -> bool {\n...\n}\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 4
line_stop: 4
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32, b: u32) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 4
line_stop: 4
col_start: 23
col_stop: 24
path: compiler-test
content: "function main(a: u32, b: u32) -> bool {"
output: Boolean
block:
statements:
- Conditional:
condition:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if a == b {\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if a == b {\\\"}\"}"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 8
col_stop: 14
path: compiler-test
content: " if a == b {"
block:
statements:
- Console:
function:
Log:
parts:
- Const: ""
- Container
- Const: "=="
- Container
parameters:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":31,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}=={}\\\\\\\", a, b); // This line should not fail.\\\"}\"}"
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}=={}\\\\\\\", a, b); // This line should not fail.\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 21
col_stop: 35
path: compiler-test
content: " console.log(\"{}=={}\", a, b); // This line should not fail."
span:
line_start: 6
line_stop: 6
col_start: 9
col_stop: 35
path: compiler-test
content: " console.log(\"{}=={}\", a, b); // This line should not fail."
span:
line_start: 5
line_stop: 7
col_start: 15
col_stop: 6
path: compiler-test
content: " if a == b {\n...\n }"
next: ~
span:
line_start: 5
line_stop: 7
col_start: 5
col_stop: 6
path: compiler-test
content: " if a == b {\n...\n }"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 9
line_stop: 9
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 4
line_stop: 10
col_start: 39
col_stop: 2
path: compiler-test
content: "function main(a: u32, b: u32) -> bool {\n...\n}"
span:
line_start: 4
line_stop: 10
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32, b: u32) -> bool {\n...\n}\n\n\n\n"

View File

@ -16,3 +16,279 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Log:
parts:
- Const: "a = "
- Container
parameters:
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"a = {}\\\\\\\", y);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 28
path: compiler-test
content: " console.log(\"a = {}\", y);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 28
path: compiler-test
content: " console.log(\"a = {}\", y);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Log:
parts:
- Const: "a = "
- Container
parameters:
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"a = {}\\\\\\\", y);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 28
path: compiler-test
content: " console.log(\"a = {}\", y);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 28
path: compiler-test
content: " console.log(\"a = {}\", y);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Log:
parts:
- Const: "a = "
- Container
parameters:
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"a = {}\\\\\\\", y);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 28
path: compiler-test
content: " console.log(\"a = {}\", y);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 28
path: compiler-test
content: " console.log(\"a = {}\", y);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"

View File

@ -16,3 +16,306 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Log:
parts:
- Const: ""
- Container
parameters:
- Value:
Integer:
- U32
- "1"
- line_start: 4
line_stop: 4
col_start: 23
col_stop: 27
path: compiler-test
content: " console.log(\"{}\", 1u32);"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 27
path: compiler-test
content: " console.log(\"{}\", 1u32);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 27
path: compiler-test
content: " console.log(\"{}\", 1u32);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Log:
parts:
- Const: ""
- Container
parameters:
- Value:
Integer:
- U32
- "1"
- line_start: 4
line_stop: 4
col_start: 23
col_stop: 27
path: compiler-test
content: " console.log(\"{}\", 1u32);"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 27
path: compiler-test
content: " console.log(\"{}\", 1u32);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 27
path: compiler-test
content: " console.log(\"{}\", 1u32);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Log:
parts:
- Const: ""
- Container
parameters:
- Value:
Integer:
- U32
- "1"
- line_start: 4
line_stop: 4
col_start: 23
col_stop: 27
path: compiler-test
content: " console.log(\"{}\", 1u32);"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 27
path: compiler-test
content: " console.log(\"{}\", 1u32);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 27
path: compiler-test
content: " console.log(\"{}\", 1u32);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"

View File

@ -16,3 +16,339 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Log:
parts:
- Const: ""
- Container
- Const: " "
- Container
parameters:
- Value:
Integer:
- U32
- "1"
- line_start: 4
line_stop: 4
col_start: 26
col_stop: 30
path: compiler-test
content: " console.log(\"{} {}\", 1u32, true);"
- Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 32
col_stop: 36
path: compiler-test
content: " console.log(\"{} {}\", 1u32, true);"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 36
path: compiler-test
content: " console.log(\"{} {}\", 1u32, true);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 36
path: compiler-test
content: " console.log(\"{} {}\", 1u32, true);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Log:
parts:
- Const: ""
- Container
- Const: " "
- Container
parameters:
- Value:
Integer:
- U32
- "1"
- line_start: 4
line_stop: 4
col_start: 26
col_stop: 30
path: compiler-test
content: " console.log(\"{} {}\", 1u32, true);"
- Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 32
col_stop: 36
path: compiler-test
content: " console.log(\"{} {}\", 1u32, true);"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 36
path: compiler-test
content: " console.log(\"{} {}\", 1u32, true);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 36
path: compiler-test
content: " console.log(\"{} {}\", 1u32, true);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Console:
function:
Log:
parts:
- Const: ""
- Container
- Const: " "
- Container
parameters:
- Value:
Integer:
- U32
- "1"
- line_start: 4
line_stop: 4
col_start: 26
col_stop: 30
path: compiler-test
content: " console.log(\"{} {}\", 1u32, true);"
- Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 32
col_stop: 36
path: compiler-test
content: " console.log(\"{} {}\", 1u32, true);"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 36
path: compiler-test
content: " console.log(\"{} {}\", 1u32, true);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 36
path: compiler-test
content: " console.log(\"{} {}\", 1u32, true);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 5
line_stop: 5
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 3
line_stop: 6
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"

View File

@ -16,3 +16,314 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}"
members: []
global_consts: {}
functions:
"{\"name\":\"fake_test\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function fake_test() {}\\\"}\"}":
annotations:
- span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 6
path: compiler-test
content: "@test"
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"@test\\\"}\"}"
arguments: []
identifier: "{\"name\":\"fake_test\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function fake_test() {}\\\"}\"}"
input: []
output: ~
block:
statements: []
span:
line_start: 4
line_stop: 4
col_start: 22
col_stop: 24
path: compiler-test
content: "function fake_test() {}"
span:
line_start: 4
line_stop: 4
col_start: 1
col_stop: 24
path: compiler-test
content: "function fake_test() {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 6
line_stop: 6
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 7
line_stop: 7
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 6
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 6
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}"
members: []
global_consts: {}
functions:
"{\"name\":\"fake_test\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function fake_test() {}\\\"}\"}":
annotations:
- span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 6
path: compiler-test
content: "@test"
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"@test\\\"}\"}"
arguments: []
identifier: "{\"name\":\"fake_test\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function fake_test() {}\\\"}\"}"
input: []
output:
Tuple: []
block:
statements: []
span:
line_start: 4
line_stop: 4
col_start: 22
col_stop: 24
path: compiler-test
content: "function fake_test() {}"
span:
line_start: 4
line_stop: 4
col_start: 1
col_stop: 24
path: compiler-test
content: "function fake_test() {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 6
line_stop: 6
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 7
line_stop: 7
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 6
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 6
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}"
members: []
global_consts: {}
functions:
"{\"name\":\"fake_test\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function fake_test() {}\\\"}\"}":
annotations:
- span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 6
path: compiler-test
content: "@test"
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"@test\\\"}\"}"
arguments: []
identifier: "{\"name\":\"fake_test\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function fake_test() {}\\\"}\"}"
input: []
output:
Tuple: []
block:
statements: []
span:
line_start: 4
line_stop: 4
col_start: 22
col_stop: 24
path: compiler-test
content: "function fake_test() {}"
span:
line_start: 4
line_stop: 4
col_start: 1
col_stop: 24
path: compiler-test
content: "function fake_test() {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 6
line_stop: 6
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 7
line_stop: 7
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 6
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 6
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"

View File

@ -16,3 +16,458 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports:
- package_or_packages:
Package:
name: "{\"name\":\"core\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"import core.unstable.blake2s.Blake2s;\\\"}\"}"
access:
SubPackage:
name: "{\"name\":\"unstable\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"import core.unstable.blake2s.Blake2s;\\\"}\"}"
access:
SubPackage:
name: "{\"name\":\"blake2s\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"import core.unstable.blake2s.Blake2s;\\\"}\"}"
access:
Symbol:
symbol: "{\"name\":\"Blake2s\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":30,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"import core.unstable.blake2s.Blake2s;\\\"}\"}"
alias: ~
span:
line_start: 11
line_stop: 11
col_start: 30
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
span:
line_start: 11
line_stop: 11
col_start: 22
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
span:
line_start: 11
line_stop: 11
col_start: 13
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
span:
line_start: 11
line_stop: 11
col_start: 8
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
span:
line_start: 11
line_stop: 11
col_start: 8
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}"
members: []
global_consts: {}
functions:
"{\"name\":\"fake_test\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function fake_test() {}\\\"}\"}":
annotations:
- span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 6
path: compiler-test
content: "@test "
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"@test \\\"}\"}"
arguments: []
identifier: "{\"name\":\"fake_test\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function fake_test() {}\\\"}\"}"
input: []
output: ~
block:
statements: []
span:
line_start: 4
line_stop: 4
col_start: 22
col_stop: 24
path: compiler-test
content: "function fake_test() {}"
span:
line_start: 4
line_stop: 4
col_start: 1
col_stop: 24
path: compiler-test
content: "function fake_test() {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 6
line_stop: 6
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 7
line_stop: 7
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 6
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 6
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports:
- package_or_packages:
Package:
name: "{\"name\":\"core\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"import core.unstable.blake2s.Blake2s;\\\"}\"}"
access:
SubPackage:
name: "{\"name\":\"unstable\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"import core.unstable.blake2s.Blake2s;\\\"}\"}"
access:
SubPackage:
name: "{\"name\":\"blake2s\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"import core.unstable.blake2s.Blake2s;\\\"}\"}"
access:
Symbol:
symbol: "{\"name\":\"Blake2s\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":30,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"import core.unstable.blake2s.Blake2s;\\\"}\"}"
alias: ~
span:
line_start: 11
line_stop: 11
col_start: 30
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
span:
line_start: 11
line_stop: 11
col_start: 22
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
span:
line_start: 11
line_stop: 11
col_start: 13
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
span:
line_start: 11
line_stop: 11
col_start: 8
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
span:
line_start: 11
line_stop: 11
col_start: 8
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}"
members: []
global_consts: {}
functions:
"{\"name\":\"fake_test\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function fake_test() {}\\\"}\"}":
annotations:
- span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 6
path: compiler-test
content: "@test "
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"@test \\\"}\"}"
arguments: []
identifier: "{\"name\":\"fake_test\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function fake_test() {}\\\"}\"}"
input: []
output:
Tuple: []
block:
statements: []
span:
line_start: 4
line_stop: 4
col_start: 22
col_stop: 24
path: compiler-test
content: "function fake_test() {}"
span:
line_start: 4
line_stop: 4
col_start: 1
col_stop: 24
path: compiler-test
content: "function fake_test() {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 6
line_stop: 6
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 7
line_stop: 7
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 6
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 6
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports:
- package_or_packages:
Package:
name: "{\"name\":\"core\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"import core.unstable.blake2s.Blake2s;\\\"}\"}"
access:
SubPackage:
name: "{\"name\":\"unstable\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"import core.unstable.blake2s.Blake2s;\\\"}\"}"
access:
SubPackage:
name: "{\"name\":\"blake2s\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":29,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"import core.unstable.blake2s.Blake2s;\\\"}\"}"
access:
Symbol:
symbol: "{\"name\":\"Blake2s\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":30,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"import core.unstable.blake2s.Blake2s;\\\"}\"}"
alias: ~
span:
line_start: 11
line_stop: 11
col_start: 30
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
span:
line_start: 11
line_stop: 11
col_start: 22
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
span:
line_start: 11
line_stop: 11
col_start: 13
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
span:
line_start: 11
line_stop: 11
col_start: 8
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
span:
line_start: 11
line_stop: 11
col_start: 8
col_stop: 37
path: compiler-test
content: import core.unstable.blake2s.Blake2s;
circuits:
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}":
circuit_name: "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}"
members: []
global_consts: {}
functions:
"{\"name\":\"fake_test\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function fake_test() {}\\\"}\"}":
annotations:
- span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 6
path: compiler-test
content: "@test "
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"@test \\\"}\"}"
arguments: []
identifier: "{\"name\":\"fake_test\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function fake_test() {}\\\"}\"}"
input: []
output:
Tuple: []
block:
statements: []
span:
line_start: 4
line_stop: 4
col_start: 22
col_stop: 24
path: compiler-test
content: "function fake_test() {}"
span:
line_start: 4
line_stop: 4
col_start: 1
col_stop: 24
path: compiler-test
content: "function fake_test() {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 6
line_stop: 6
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 7
line_stop: 7
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 6
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 6
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"

View File

@ -16,3 +16,297 @@ outputs:
r:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a + b == c;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a + b == c;\\\"}\"}"
op: Add
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 16
path: compiler-test
content: " return a + b == c;"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a + b == c;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 21
path: compiler-test
content: " return a + b == c;"
span:
line_start: 4
line_stop: 4
col_start: 4
col_stop: 21
path: compiler-test
content: " return a + b == c;"
span:
line_start: 3
line_stop: 5
col_start: 53
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a + b == c;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a + b == c;\\\"}\"}"
op: Add
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 16
path: compiler-test
content: " return a + b == c;"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a + b == c;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 21
path: compiler-test
content: " return a + b == c;"
span:
line_start: 4
line_stop: 4
col_start: 4
col_stop: 21
path: compiler-test
content: " return a + b == c;"
span:
line_start: 3
line_stop: 5
col_start: 53
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a + b == c;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a + b == c;\\\"}\"}"
op: Add
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 16
path: compiler-test
content: " return a + b == c;"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a + b == c;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 21
path: compiler-test
content: " return a + b == c;"
span:
line_start: 4
line_stop: 4
col_start: 4
col_stop: 21
path: compiler-test
content: " return a + b == c;"
span:
line_start: 3
line_stop: 5
col_start: 53
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"

View File

@ -16,3 +16,297 @@ outputs:
r:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a / b != c;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a / b != c;\\\"}\"}"
op: Div
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 17
path: compiler-test
content: " return a / b != c;"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a / b != c;\\\"}\"}"
op: Ne
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 22
path: compiler-test
content: " return a / b != c;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 22
path: compiler-test
content: " return a / b != c;"
span:
line_start: 3
line_stop: 5
col_start: 53
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a / b != c;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a / b != c;\\\"}\"}"
op: Div
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 17
path: compiler-test
content: " return a / b != c;"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a / b != c;\\\"}\"}"
op: Ne
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 22
path: compiler-test
content: " return a / b != c;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 22
path: compiler-test
content: " return a / b != c;"
span:
line_start: 3
line_stop: 5
col_start: 53
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a / b != c;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a / b != c;\\\"}\"}"
op: Div
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 17
path: compiler-test
content: " return a / b != c;"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a / b != c;\\\"}\"}"
op: Ne
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 22
path: compiler-test
content: " return a / b != c;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 22
path: compiler-test
content: " return a / b != c;"
span:
line_start: 3
line_stop: 5
col_start: 53
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"

View File

@ -16,3 +16,225 @@ outputs:
r:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 3
line_stop: 5
col_start: 43
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 3
line_stop: 5
col_start: 43
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == b;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a == b;"
span:
line_start: 3
line_stop: 5
col_start: 43
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field) -> bool {\n...\n}"

View File

@ -16,3 +16,369 @@ outputs:
r:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"negOneField\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const negOneField: field = -1field;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 22
path: compiler-test
content: " const negOneField: field = -1field;"
type_: Field
value:
Unary:
inner:
Value:
Field:
- "1"
- line_start: 4
line_stop: 4
col_start: 33
col_stop: 39
path: compiler-test
content: " const negOneField: field = -1field;"
op: Negate
span:
line_start: 4
line_stop: 4
col_start: 32
col_stop: 39
path: compiler-test
content: " const negOneField: field = -1field;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 39
path: compiler-test
content: " const negOneField: field = -1field;"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"negOneField\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return negOneField + a == 0field;\\\"}\"}"
right:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return negOneField + a == 0field;\\\"}\"}"
op: Add
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 27
path: compiler-test
content: " return negOneField + a == 0field;"
right:
Value:
Field:
- "0"
- line_start: 5
line_stop: 5
col_start: 31
col_stop: 37
path: compiler-test
content: " return negOneField + a == 0field;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 37
path: compiler-test
content: " return negOneField + a == 0field;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 37
path: compiler-test
content: " return negOneField + a == 0field;"
span:
line_start: 3
line_stop: 6
col_start: 33
col_stop: 2
path: compiler-test
content: "function main(a: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field) -> bool {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"negOneField\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const negOneField: field = -1field;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 22
path: compiler-test
content: " const negOneField: field = -1field;"
type_: Field
value:
Unary:
inner:
Value:
Field:
- "1"
- line_start: 4
line_stop: 4
col_start: 33
col_stop: 39
path: compiler-test
content: " const negOneField: field = -1field;"
op: Negate
span:
line_start: 4
line_stop: 4
col_start: 32
col_stop: 39
path: compiler-test
content: " const negOneField: field = -1field;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 39
path: compiler-test
content: " const negOneField: field = -1field;"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"negOneField\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return negOneField + a == 0field;\\\"}\"}"
right:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return negOneField + a == 0field;\\\"}\"}"
op: Add
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 27
path: compiler-test
content: " return negOneField + a == 0field;"
right:
Value:
Field:
- "0"
- line_start: 5
line_stop: 5
col_start: 31
col_stop: 37
path: compiler-test
content: " return negOneField + a == 0field;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 37
path: compiler-test
content: " return negOneField + a == 0field;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 37
path: compiler-test
content: " return negOneField + a == 0field;"
span:
line_start: 3
line_stop: 6
col_start: 33
col_stop: 2
path: compiler-test
content: "function main(a: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field) -> bool {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"negOneField\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const negOneField: field = -1field;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 22
path: compiler-test
content: " const negOneField: field = -1field;"
type_: Field
value:
Unary:
inner:
Value:
Field:
- "1"
- line_start: 4
line_stop: 4
col_start: 33
col_stop: 39
path: compiler-test
content: " const negOneField: field = -1field;"
op: Negate
span:
line_start: 4
line_stop: 4
col_start: 32
col_stop: 39
path: compiler-test
content: " const negOneField: field = -1field;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 39
path: compiler-test
content: " const negOneField: field = -1field;"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"negOneField\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return negOneField + a == 0field;\\\"}\"}"
right:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return negOneField + a == 0field;\\\"}\"}"
op: Add
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 27
path: compiler-test
content: " return negOneField + a == 0field;"
right:
Value:
Field:
- "0"
- line_start: 5
line_stop: 5
col_start: 31
col_stop: 37
path: compiler-test
content: " return negOneField + a == 0field;"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 37
path: compiler-test
content: " return negOneField + a == 0field;"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 37
path: compiler-test
content: " return negOneField + a == 0field;"
span:
line_start: 3
line_stop: 6
col_start: 33
col_stop: 2
path: compiler-test
content: "function main(a: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 6
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field) -> bool {\n...\n}\n"

View File

@ -16,3 +16,297 @@ outputs:
r:
type: bool
value: "false"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a * b == c;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a * b == c;\\\"}\"}"
op: Mul
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 16
path: compiler-test
content: " return a * b == c;"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a * b == c;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 21
path: compiler-test
content: " return a * b == c;"
span:
line_start: 4
line_stop: 4
col_start: 4
col_stop: 21
path: compiler-test
content: " return a * b == c;"
span:
line_start: 3
line_stop: 5
col_start: 53
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a * b == c;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a * b == c;\\\"}\"}"
op: Mul
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 16
path: compiler-test
content: " return a * b == c;"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a * b == c;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 21
path: compiler-test
content: " return a * b == c;"
span:
line_start: 4
line_stop: 4
col_start: 4
col_stop: 21
path: compiler-test
content: " return a * b == c;"
span:
line_start: 3
line_stop: 5
col_start: 53
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
- Variable:
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, c: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a * b == c;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a * b == c;\\\"}\"}"
op: Mul
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 16
path: compiler-test
content: " return a * b == c;"
right:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a * b == c;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 21
path: compiler-test
content: " return a * b == c;"
span:
line_start: 4
line_stop: 4
col_start: 4
col_stop: 21
path: compiler-test
content: " return a * b == c;"
span:
line_start: 3
line_stop: 5
col_start: 53
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, c: field) -> bool {\n...\n}"

View File

@ -16,3 +16,285 @@ outputs:
r:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Unary:
inner:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == -b;\\\"}\"}"
op: Negate
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 13
path: compiler-test
content: " return -a == -b;"
right:
Unary:
inner:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == -b;\\\"}\"}"
op: Negate
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 19
path: compiler-test
content: " return -a == -b;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 19
path: compiler-test
content: " return -a == -b;"
span:
line_start: 4
line_stop: 4
col_start: 4
col_stop: 19
path: compiler-test
content: " return -a == -b;"
span:
line_start: 3
line_stop: 5
col_start: 43
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Unary:
inner:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == -b;\\\"}\"}"
op: Negate
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 13
path: compiler-test
content: " return -a == -b;"
right:
Unary:
inner:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == -b;\\\"}\"}"
op: Negate
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 19
path: compiler-test
content: " return -a == -b;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 19
path: compiler-test
content: " return -a == -b;"
span:
line_start: 4
line_stop: 4
col_start: 4
col_stop: 19
path: compiler-test
content: " return -a == -b;"
span:
line_start: 3
line_stop: 5
col_start: 43
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Unary:
inner:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == -b;\\\"}\"}"
op: Negate
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 13
path: compiler-test
content: " return -a == -b;"
right:
Unary:
inner:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return -a == -b;\\\"}\"}"
op: Negate
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 19
path: compiler-test
content: " return -a == -b;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 11
col_stop: 19
path: compiler-test
content: " return -a == -b;"
span:
line_start: 4
line_stop: 4
col_start: 4
col_stop: 19
path: compiler-test
content: " return -a == -b;"
span:
line_start: 3
line_stop: 5
col_start: 43
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field) -> bool {\n...\n}"

View File

@ -16,3 +16,519 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function foo(a: [u8; 1]) {}\\\"}\"}":
annotations: []
identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function foo(a: [u8; 1]) {}\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function foo(a: [u8; 1]) {}\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "1"
span:
line_start: 3
line_stop: 3
col_start: 14
col_stop: 15
path: compiler-test
content: "function foo(a: [u8; 1]) {}"
output: ~
block:
statements: []
span:
line_start: 3
line_stop: 3
col_start: 26
col_stop: 28
path: compiler-test
content: "function foo(a: [u8; 1]) {}"
span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 28
path: compiler-test
content: "function foo(a: [u8; 1]) {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a: [u8; 1] = [1; 1];\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const a: [u8; 1] = [1; 1];"
type_:
Array:
- IntegerType: U8
- - value: "1"
value:
ArrayInit:
element:
Value:
Implicit:
- "1"
- line_start: 6
line_stop: 6
col_start: 25
col_stop: 26
path: compiler-test
content: " const a: [u8; 1] = [1; 1];"
dimensions:
- value: "1"
span:
line_start: 6
line_stop: 6
col_start: 24
col_stop: 30
path: compiler-test
content: " const a: [u8; 1] = [1; 1];"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 30
path: compiler-test
content: " const a: [u8; 1] = [1; 1];"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" foo(a);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" foo(a);\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 11
path: compiler-test
content: " foo(a);"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 11
path: compiler-test
content: " foo(a);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 8
line_stop: 8
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 5
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function foo(a: [u8; 1]) {}\\\"}\"}":
annotations: []
identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function foo(a: [u8; 1]) {}\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function foo(a: [u8; 1]) {}\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "1"
span:
line_start: 3
line_stop: 3
col_start: 14
col_stop: 15
path: compiler-test
content: "function foo(a: [u8; 1]) {}"
output:
Tuple: []
block:
statements: []
span:
line_start: 3
line_stop: 3
col_start: 26
col_stop: 28
path: compiler-test
content: "function foo(a: [u8; 1]) {}"
span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 28
path: compiler-test
content: "function foo(a: [u8; 1]) {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a: [u8; 1] = [1; 1];\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const a: [u8; 1] = [1; 1];"
type_:
Array:
- IntegerType: U8
- - value: "1"
value:
ArrayInit:
element:
Value:
Implicit:
- "1"
- line_start: 6
line_stop: 6
col_start: 25
col_stop: 26
path: compiler-test
content: " const a: [u8; 1] = [1; 1];"
dimensions:
- value: "1"
span:
line_start: 6
line_stop: 6
col_start: 24
col_stop: 30
path: compiler-test
content: " const a: [u8; 1] = [1; 1];"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 30
path: compiler-test
content: " const a: [u8; 1] = [1; 1];"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" foo(a);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" foo(a);\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 11
path: compiler-test
content: " foo(a);"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 11
path: compiler-test
content: " foo(a);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 8
line_stop: 8
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 5
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function foo(a: [u8; 1]) {}\\\"}\"}":
annotations: []
identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function foo(a: [u8; 1]) {}\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function foo(a: [u8; 1]) {}\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "1"
span:
line_start: 3
line_stop: 3
col_start: 14
col_stop: 15
path: compiler-test
content: "function foo(a: [u8; 1]) {}"
output:
Tuple: []
block:
statements: []
span:
line_start: 3
line_stop: 3
col_start: 26
col_stop: 28
path: compiler-test
content: "function foo(a: [u8; 1]) {}"
span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 28
path: compiler-test
content: "function foo(a: [u8; 1]) {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a: [u8; 1] = [1; 1];\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const a: [u8; 1] = [1; 1];"
type_:
Array:
- IntegerType: U8
- - value: "1"
value:
ArrayInit:
element:
Value:
Integer:
- U8
- "1"
- line_start: 6
line_stop: 6
col_start: 25
col_stop: 26
path: compiler-test
content: " const a: [u8; 1] = [1; 1];"
dimensions:
- value: "1"
span:
line_start: 6
line_stop: 6
col_start: 24
col_stop: 30
path: compiler-test
content: " const a: [u8; 1] = [1; 1];"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 30
path: compiler-test
content: " const a: [u8; 1] = [1; 1];"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" foo(a);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" foo(a);\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 11
path: compiler-test
content: " foo(a);"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 11
path: compiler-test
content: " foo(a);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 8
line_stop: 8
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 5
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"

View File

@ -16,3 +16,738 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function do_nothing(arr: [u32; 2]) {}\\\"}\"}":
annotations: []
identifier: "{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function do_nothing(arr: [u32; 2]) {}\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function do_nothing(arr: [u32; 2]) {}\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U32
- - value: "2"
span:
line_start: 3
line_stop: 3
col_start: 21
col_stop: 24
path: compiler-test
content: "function do_nothing(arr: [u32; 2]) {}"
output: ~
block:
statements: []
span:
line_start: 3
line_stop: 3
col_start: 36
col_stop: 38
path: compiler-test
content: "function do_nothing(arr: [u32; 2]) {}"
span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 38
path: compiler-test
content: "function do_nothing(arr: [u32; 2]) {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const arr: [u32; 2] = [0; 2];\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 14
path: compiler-test
content: " const arr: [u32; 2] = [0; 2];"
type_:
Array:
- IntegerType: U32
- - value: "2"
value:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 28
col_stop: 29
path: compiler-test
content: " const arr: [u32; 2] = [0; 2];"
dimensions:
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 27
col_stop: 33
path: compiler-test
content: " const arr: [u32; 2] = [0; 2];"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 33
path: compiler-test
content: " const arr: [u32; 2] = [0; 2];"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing(arr);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing(arr);\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 20
path: compiler-test
content: " do_nothing(arr);"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 20
path: compiler-test
content: " do_nothing(arr);"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing([...arr]);\\\"}\"}"
arguments:
- ArrayInline:
elements:
- Spread:
Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing([...arr]);\\\"}\"}"
span:
line_start: 9
line_stop: 9
col_start: 16
col_stop: 24
path: compiler-test
content: " do_nothing([...arr]);"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 25
path: compiler-test
content: " do_nothing([...arr]);"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 25
path: compiler-test
content: " do_nothing([...arr]);"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing(arr[0u32..]);\\\"}\"}"
arguments:
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing(arr[0u32..]);\\\"}\"}"
left:
Value:
Integer:
- U32
- "0"
- line_start: 10
line_stop: 10
col_start: 20
col_stop: 24
path: compiler-test
content: " do_nothing(arr[0u32..]);"
right: ~
span:
line_start: 10
line_stop: 10
col_start: 16
col_stop: 27
path: compiler-test
content: " do_nothing(arr[0u32..]);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 28
path: compiler-test
content: " do_nothing(arr[0u32..]);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 28
path: compiler-test
content: " do_nothing(arr[0u32..]);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 12
line_stop: 12
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 12
line_stop: 12
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 13
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 5
line_stop: 13
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function do_nothing(arr: [u32; 2]) {}\\\"}\"}":
annotations: []
identifier: "{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function do_nothing(arr: [u32; 2]) {}\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function do_nothing(arr: [u32; 2]) {}\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U32
- - value: "2"
span:
line_start: 3
line_stop: 3
col_start: 21
col_stop: 24
path: compiler-test
content: "function do_nothing(arr: [u32; 2]) {}"
output:
Tuple: []
block:
statements: []
span:
line_start: 3
line_stop: 3
col_start: 36
col_stop: 38
path: compiler-test
content: "function do_nothing(arr: [u32; 2]) {}"
span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 38
path: compiler-test
content: "function do_nothing(arr: [u32; 2]) {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const arr: [u32; 2] = [0; 2];\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 14
path: compiler-test
content: " const arr: [u32; 2] = [0; 2];"
type_:
Array:
- IntegerType: U32
- - value: "2"
value:
ArrayInit:
element:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 28
col_stop: 29
path: compiler-test
content: " const arr: [u32; 2] = [0; 2];"
dimensions:
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 27
col_stop: 33
path: compiler-test
content: " const arr: [u32; 2] = [0; 2];"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 33
path: compiler-test
content: " const arr: [u32; 2] = [0; 2];"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing(arr);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing(arr);\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 20
path: compiler-test
content: " do_nothing(arr);"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 20
path: compiler-test
content: " do_nothing(arr);"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing([...arr]);\\\"}\"}"
arguments:
- ArrayInline:
elements:
- Spread:
Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing([...arr]);\\\"}\"}"
span:
line_start: 9
line_stop: 9
col_start: 16
col_stop: 24
path: compiler-test
content: " do_nothing([...arr]);"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 25
path: compiler-test
content: " do_nothing([...arr]);"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 25
path: compiler-test
content: " do_nothing([...arr]);"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing(arr[0u32..]);\\\"}\"}"
arguments:
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing(arr[0u32..]);\\\"}\"}"
left:
Value:
Integer:
- U32
- "0"
- line_start: 10
line_stop: 10
col_start: 20
col_stop: 24
path: compiler-test
content: " do_nothing(arr[0u32..]);"
right: ~
span:
line_start: 10
line_stop: 10
col_start: 16
col_stop: 27
path: compiler-test
content: " do_nothing(arr[0u32..]);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 28
path: compiler-test
content: " do_nothing(arr[0u32..]);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 28
path: compiler-test
content: " do_nothing(arr[0u32..]);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 12
line_stop: 12
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 12
line_stop: 12
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 13
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 5
line_stop: 13
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function do_nothing(arr: [u32; 2]) {}\\\"}\"}":
annotations: []
identifier: "{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function do_nothing(arr: [u32; 2]) {}\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":21,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function do_nothing(arr: [u32; 2]) {}\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U32
- - value: "2"
span:
line_start: 3
line_stop: 3
col_start: 21
col_stop: 24
path: compiler-test
content: "function do_nothing(arr: [u32; 2]) {}"
output:
Tuple: []
block:
statements: []
span:
line_start: 3
line_stop: 3
col_start: 36
col_stop: 38
path: compiler-test
content: "function do_nothing(arr: [u32; 2]) {}"
span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 38
path: compiler-test
content: "function do_nothing(arr: [u32; 2]) {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const arr: [u32; 2] = [0; 2];\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 14
path: compiler-test
content: " const arr: [u32; 2] = [0; 2];"
type_:
Array:
- IntegerType: U32
- - value: "2"
value:
ArrayInit:
element:
Value:
Integer:
- U32
- "0"
- line_start: 6
line_stop: 6
col_start: 28
col_stop: 29
path: compiler-test
content: " const arr: [u32; 2] = [0; 2];"
dimensions:
- value: "2"
span:
line_start: 6
line_stop: 6
col_start: 27
col_stop: 33
path: compiler-test
content: " const arr: [u32; 2] = [0; 2];"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 33
path: compiler-test
content: " const arr: [u32; 2] = [0; 2];"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing(arr);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing(arr);\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 20
path: compiler-test
content: " do_nothing(arr);"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 20
path: compiler-test
content: " do_nothing(arr);"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing([...arr]);\\\"}\"}"
arguments:
- ArrayInline:
elements:
- Spread:
Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing([...arr]);\\\"}\"}"
span:
line_start: 9
line_stop: 9
col_start: 16
col_stop: 24
path: compiler-test
content: " do_nothing([...arr]);"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 25
path: compiler-test
content: " do_nothing([...arr]);"
span:
line_start: 9
line_stop: 9
col_start: 5
col_stop: 25
path: compiler-test
content: " do_nothing([...arr]);"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"do_nothing\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing(arr[0u32..]);\\\"}\"}"
arguments:
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"arr\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" do_nothing(arr[0u32..]);\\\"}\"}"
left:
Value:
Integer:
- U32
- "0"
- line_start: 10
line_stop: 10
col_start: 20
col_stop: 24
path: compiler-test
content: " do_nothing(arr[0u32..]);"
right: ~
span:
line_start: 10
line_stop: 10
col_start: 16
col_stop: 27
path: compiler-test
content: " do_nothing(arr[0u32..]);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 28
path: compiler-test
content: " do_nothing(arr[0u32..]);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 28
path: compiler-test
content: " do_nothing(arr[0u32..]);"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 12
line_stop: 12
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 12
line_stop: 12
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 13
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 5
line_stop: 13
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n"

View File

@ -16,3 +16,393 @@ outputs:
a:
type: u32
value: "4"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Conditional:
condition:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if a == 2u32 {\\\"}\"}"
right:
Value:
Integer:
- U32
- "2"
- line_start: 4
line_stop: 4
col_start: 13
col_stop: 17
path: compiler-test
content: " if a == 2u32 {"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 8
col_stop: 17
path: compiler-test
content: " if a == 2u32 {"
block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "3"
- line_start: 5
line_stop: 5
col_start: 16
col_stop: 20
path: compiler-test
content: " return 3u32;"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 20
path: compiler-test
content: " return 3u32;"
span:
line_start: 4
line_stop: 6
col_start: 18
col_stop: 6
path: compiler-test
content: " if a == 2u32 {\n...\n } else {"
next:
Block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "4"
- line_start: 7
line_stop: 7
col_start: 16
col_stop: 20
path: compiler-test
content: " return 4u32;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 20
path: compiler-test
content: " return 4u32;"
span:
line_start: 6
line_stop: 8
col_start: 12
col_stop: 6
path: compiler-test
content: " } else {\n...\n } "
span:
line_start: 4
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " if a == 2u32 {\n...\n } else {\n...\n } "
span:
line_start: 3
line_stop: 9
col_start: 30
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> u32 {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> u32 {\n...\n}\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Conditional:
condition:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if a == 2u32 {\\\"}\"}"
right:
Value:
Integer:
- U32
- "2"
- line_start: 4
line_stop: 4
col_start: 13
col_stop: 17
path: compiler-test
content: " if a == 2u32 {"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 8
col_stop: 17
path: compiler-test
content: " if a == 2u32 {"
block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "3"
- line_start: 5
line_stop: 5
col_start: 16
col_stop: 20
path: compiler-test
content: " return 3u32;"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 20
path: compiler-test
content: " return 3u32;"
span:
line_start: 4
line_stop: 6
col_start: 18
col_stop: 6
path: compiler-test
content: " if a == 2u32 {\n...\n } else {"
next:
Block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "4"
- line_start: 7
line_stop: 7
col_start: 16
col_stop: 20
path: compiler-test
content: " return 4u32;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 20
path: compiler-test
content: " return 4u32;"
span:
line_start: 6
line_stop: 8
col_start: 12
col_stop: 6
path: compiler-test
content: " } else {\n...\n } "
span:
line_start: 4
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " if a == 2u32 {\n...\n } else {\n...\n } "
span:
line_start: 3
line_stop: 9
col_start: 30
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> u32 {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> u32 {\n...\n}\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> u32 {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> u32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32) -> u32 {"
output:
IntegerType: U32
block:
statements:
- Conditional:
condition:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" if a == 2u32 {\\\"}\"}"
right:
Value:
Integer:
- U32
- "2"
- line_start: 4
line_stop: 4
col_start: 13
col_stop: 17
path: compiler-test
content: " if a == 2u32 {"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 8
col_stop: 17
path: compiler-test
content: " if a == 2u32 {"
block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "3"
- line_start: 5
line_stop: 5
col_start: 16
col_stop: 20
path: compiler-test
content: " return 3u32;"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 20
path: compiler-test
content: " return 3u32;"
span:
line_start: 4
line_stop: 6
col_start: 18
col_stop: 6
path: compiler-test
content: " if a == 2u32 {\n...\n } else {"
next:
Block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "4"
- line_start: 7
line_stop: 7
col_start: 16
col_stop: 20
path: compiler-test
content: " return 4u32;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 20
path: compiler-test
content: " return 4u32;"
span:
line_start: 6
line_stop: 8
col_start: 12
col_stop: 6
path: compiler-test
content: " } else {\n...\n } "
span:
line_start: 4
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " if a == 2u32 {\n...\n } else {\n...\n } "
span:
line_start: 3
line_stop: 9
col_start: 30
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> u32 {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> u32 {\n...\n}\n\n\n\n"

View File

@ -16,3 +16,338 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"empty\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function empty() {}\\\"}\"}":
annotations: []
identifier: "{\"name\":\"empty\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function empty() {}\\\"}\"}"
input: []
output: ~
block:
statements: []
span:
line_start: 3
line_stop: 3
col_start: 18
col_stop: 20
path: compiler-test
content: "function empty() {}"
span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 20
path: compiler-test
content: "function empty() {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"empty\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" empty();\\\"}\"}"
arguments: []
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 12
path: compiler-test
content: " empty();"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 12
path: compiler-test
content: " empty();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 7
line_stop: 7
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 5
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"empty\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function empty() {}\\\"}\"}":
annotations: []
identifier: "{\"name\":\"empty\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function empty() {}\\\"}\"}"
input: []
output:
Tuple: []
block:
statements: []
span:
line_start: 3
line_stop: 3
col_start: 18
col_stop: 20
path: compiler-test
content: "function empty() {}"
span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 20
path: compiler-test
content: "function empty() {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"empty\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" empty();\\\"}\"}"
arguments: []
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 12
path: compiler-test
content: " empty();"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 12
path: compiler-test
content: " empty();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 7
line_stop: 7
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 5
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"empty\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function empty() {}\\\"}\"}":
annotations: []
identifier: "{\"name\":\"empty\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function empty() {}\\\"}\"}"
input: []
output:
Tuple: []
block:
statements: []
span:
line_start: 3
line_stop: 3
col_start: 18
col_stop: 20
path: compiler-test
content: "function empty() {}"
span:
line_start: 3
line_stop: 3
col_start: 1
col_stop: 20
path: compiler-test
content: "function empty() {}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 5
line_stop: 5
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"empty\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" empty();\\\"}\"}"
arguments: []
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 12
path: compiler-test
content: " empty();"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 12
path: compiler-test
content: " empty();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 7
line_stop: 7
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 5
line_stop: 8
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 5
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n"

View File

@ -16,3 +16,702 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> u32 {\\\"}\"}"
input: []
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "1"
- line_start: 4
line_stop: 4
col_start: 12
col_stop: 16
path: compiler-test
content: " return 1u32;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 16
path: compiler-test
content: " return 1u32;"
span:
line_start: 3
line_stop: 5
col_start: 23
col_stop: 2
path: compiler-test
content: "function one() -> u32 {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function one() -> u32 {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = 0u32;\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 9
col_stop: 10
path: compiler-test
content: " let a = 0u32;"
type_: ~
value:
Value:
Integer:
- U32
- "0"
- line_start: 8
line_stop: 8
col_start: 13
col_stop: 17
path: compiler-test
content: " let a = 0u32;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 17
path: compiler-test
content: " let a = 0u32;"
- Iteration:
variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..10 {\\\"}\"}"
start:
Value:
Implicit:
- "0"
- line_start: 10
line_stop: 10
col_start: 14
col_stop: 15
path: compiler-test
content: " for i in 0..10 {"
stop:
Value:
Implicit:
- "10"
- line_start: 10
line_stop: 10
col_start: 17
col_stop: 19
path: compiler-test
content: " for i in 0..10 {"
block:
statements:
- Assign:
operation: Add
assignee:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a += one();\\\"}\"}"
accesses: []
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 10
path: compiler-test
content: " a += one();"
value:
Call:
function:
Identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a += one();\\\"}\"}"
arguments: []
span:
line_start: 11
line_stop: 11
col_start: 14
col_stop: 19
path: compiler-test
content: " a += one();"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 19
path: compiler-test
content: " a += one();"
span:
line_start: 10
line_stop: 12
col_start: 20
col_stop: 6
path: compiler-test
content: " for i in 0..10 {\n...\n }"
span:
line_start: 10
line_stop: 12
col_start: 5
col_stop: 6
path: compiler-test
content: " for i in 0..10 {\n...\n }"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 10u32 == y;\\\"}\"}"
right:
Value:
Integer:
- U32
- "10"
- line_start: 14
line_stop: 14
col_start: 17
col_stop: 22
path: compiler-test
content: " return a == 10u32 == y;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 22
path: compiler-test
content: " return a == 10u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 10u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 27
path: compiler-test
content: " return a == 10u32 == y;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 27
path: compiler-test
content: " return a == 10u32 == y;"
span:
line_start: 7
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> u32 {\\\"}\"}"
input: []
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "1"
- line_start: 4
line_stop: 4
col_start: 12
col_stop: 16
path: compiler-test
content: " return 1u32;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 16
path: compiler-test
content: " return 1u32;"
span:
line_start: 3
line_stop: 5
col_start: 23
col_stop: 2
path: compiler-test
content: "function one() -> u32 {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function one() -> u32 {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = 0u32;\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 9
col_stop: 10
path: compiler-test
content: " let a = 0u32;"
type_: ~
value:
Value:
Integer:
- U32
- "0"
- line_start: 8
line_stop: 8
col_start: 13
col_stop: 17
path: compiler-test
content: " let a = 0u32;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 17
path: compiler-test
content: " let a = 0u32;"
- Iteration:
variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..10 {\\\"}\"}"
start:
Value:
Implicit:
- "0"
- line_start: 10
line_stop: 10
col_start: 14
col_stop: 15
path: compiler-test
content: " for i in 0..10 {"
stop:
Value:
Implicit:
- "10"
- line_start: 10
line_stop: 10
col_start: 17
col_stop: 19
path: compiler-test
content: " for i in 0..10 {"
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a += one();\\\"}\"}"
accesses: []
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 10
path: compiler-test
content: " a += one();"
value:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a += one();\\\"}\"}"
right:
Call:
function:
Identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a += one();\\\"}\"}"
arguments: []
span:
line_start: 11
line_stop: 11
col_start: 14
col_stop: 19
path: compiler-test
content: " a += one();"
op: Add
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 19
path: compiler-test
content: " a += one();"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 19
path: compiler-test
content: " a += one();"
span:
line_start: 10
line_stop: 12
col_start: 20
col_stop: 6
path: compiler-test
content: " for i in 0..10 {\n...\n }"
span:
line_start: 10
line_stop: 12
col_start: 5
col_stop: 6
path: compiler-test
content: " for i in 0..10 {\n...\n }"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 10u32 == y;\\\"}\"}"
right:
Value:
Integer:
- U32
- "10"
- line_start: 14
line_stop: 14
col_start: 17
col_stop: 22
path: compiler-test
content: " return a == 10u32 == y;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 22
path: compiler-test
content: " return a == 10u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 10u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 27
path: compiler-test
content: " return a == 10u32 == y;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 27
path: compiler-test
content: " return a == 10u32 == y;"
span:
line_start: 7
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> u32 {\\\"}\"}"
input: []
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "1"
- line_start: 4
line_stop: 4
col_start: 12
col_stop: 16
path: compiler-test
content: " return 1u32;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 16
path: compiler-test
content: " return 1u32;"
span:
line_start: 3
line_stop: 5
col_start: 23
col_stop: 2
path: compiler-test
content: "function one() -> u32 {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function one() -> u32 {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = 0u32;\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 9
col_stop: 10
path: compiler-test
content: " let a = 0u32;"
type_:
IntegerType: U32
value:
Value:
Integer:
- U32
- "0"
- line_start: 8
line_stop: 8
col_start: 13
col_stop: 17
path: compiler-test
content: " let a = 0u32;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 17
path: compiler-test
content: " let a = 0u32;"
- Iteration:
variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..10 {\\\"}\"}"
start:
Value:
Integer:
- U32
- "0"
- line_start: 10
line_stop: 10
col_start: 14
col_stop: 15
path: compiler-test
content: " for i in 0..10 {"
stop:
Value:
Integer:
- U32
- "10"
- line_start: 10
line_stop: 10
col_start: 17
col_stop: 19
path: compiler-test
content: " for i in 0..10 {"
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a += one();\\\"}\"}"
accesses: []
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 10
path: compiler-test
content: " a += one();"
value:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a += one();\\\"}\"}"
right:
Call:
function:
Identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a += one();\\\"}\"}"
arguments: []
span:
line_start: 11
line_stop: 11
col_start: 14
col_stop: 19
path: compiler-test
content: " a += one();"
op: Add
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 19
path: compiler-test
content: " a += one();"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 19
path: compiler-test
content: " a += one();"
span:
line_start: 10
line_stop: 12
col_start: 20
col_stop: 6
path: compiler-test
content: " for i in 0..10 {\n...\n }"
span:
line_start: 10
line_stop: 12
col_start: 5
col_stop: 6
path: compiler-test
content: " for i in 0..10 {\n...\n }"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 10u32 == y;\\\"}\"}"
right:
Value:
Integer:
- U32
- "10"
- line_start: 14
line_stop: 14
col_start: 17
col_stop: 22
path: compiler-test
content: " return a == 10u32 == y;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 22
path: compiler-test
content: " return a == 10u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 10u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 27
path: compiler-test
content: " return a == 10u32 == y;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 27
path: compiler-test
content: " return a == 10u32 == y;"
span:
line_start: 7
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n\n\n\n"

View File

@ -16,3 +16,831 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"iteration\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function iteration() -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"iteration\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function iteration() -> u32 {\\\"}\"}"
input: []
output:
IntegerType: U32
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = 0u32;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 9
col_stop: 10
path: compiler-test
content: " let a = 0u32;"
type_: ~
value:
Value:
Integer:
- U32
- "0"
- line_start: 4
line_stop: 4
col_start: 13
col_stop: 17
path: compiler-test
content: " let a = 0u32;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 17
path: compiler-test
content: " let a = 0u32;"
- Iteration:
variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..10 {\\\"}\"}"
start:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 14
col_stop: 15
path: compiler-test
content: " for i in 0..10 {"
stop:
Value:
Implicit:
- "10"
- line_start: 6
line_stop: 6
col_start: 17
col_stop: 19
path: compiler-test
content: " for i in 0..10 {"
block:
statements:
- Assign:
operation: Add
assignee:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a += 1;\\\"}\"}"
accesses: []
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 10
path: compiler-test
content: " a += 1;"
value:
Value:
Implicit:
- "1"
- line_start: 7
line_stop: 7
col_start: 14
col_stop: 15
path: compiler-test
content: " a += 1;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 15
path: compiler-test
content: " a += 1;"
span:
line_start: 6
line_stop: 8
col_start: 20
col_stop: 6
path: compiler-test
content: " for i in 0..10 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " for i in 0..10 {\n...\n }"
- Return:
expression:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 13
path: compiler-test
content: " return a;"
span:
line_start: 3
line_stop: 11
col_start: 29
col_stop: 2
path: compiler-test
content: "function iteration() -> u32 {\n...\n}"
span:
line_start: 3
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function iteration() -> u32 {\n...\n}\n\n\n\n\n\n"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"total\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":11,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const total = iteration() + iteration();\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 11
col_stop: 16
path: compiler-test
content: " const total = iteration() + iteration();"
type_: ~
value:
Binary:
left:
Call:
function:
Identifier: "{\"name\":\"iteration\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":19,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const total = iteration() + iteration();\\\"}\"}"
arguments: []
span:
line_start: 14
line_stop: 14
col_start: 19
col_stop: 30
path: compiler-test
content: " const total = iteration() + iteration();"
right:
Call:
function:
Identifier: "{\"name\":\"iteration\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":33,\\\"col_stop\\\":42,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const total = iteration() + iteration();\\\"}\"}"
arguments: []
span:
line_start: 14
line_stop: 14
col_start: 33
col_stop: 44
path: compiler-test
content: " const total = iteration() + iteration();"
op: Add
span:
line_start: 14
line_stop: 14
col_start: 19
col_stop: 44
path: compiler-test
content: " const total = iteration() + iteration();"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 44
path: compiler-test
content: " const total = iteration() + iteration();"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"total\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return total == 20 == y;\\\"}\"}"
right:
Value:
Implicit:
- "20"
- line_start: 16
line_stop: 16
col_start: 21
col_stop: 23
path: compiler-test
content: " return total == 20 == y;"
op: Eq
span:
line_start: 16
line_stop: 16
col_start: 12
col_stop: 23
path: compiler-test
content: " return total == 20 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return total == 20 == y;\\\"}\"}"
op: Eq
span:
line_start: 16
line_stop: 16
col_start: 12
col_stop: 28
path: compiler-test
content: " return total == 20 == y;"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 28
path: compiler-test
content: " return total == 20 == y;"
span:
line_start: 13
line_stop: 17
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 13
line_stop: 17
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"iteration\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function iteration() -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"iteration\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function iteration() -> u32 {\\\"}\"}"
input: []
output:
IntegerType: U32
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = 0u32;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 9
col_stop: 10
path: compiler-test
content: " let a = 0u32;"
type_: ~
value:
Value:
Integer:
- U32
- "0"
- line_start: 4
line_stop: 4
col_start: 13
col_stop: 17
path: compiler-test
content: " let a = 0u32;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 17
path: compiler-test
content: " let a = 0u32;"
- Iteration:
variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..10 {\\\"}\"}"
start:
Value:
Implicit:
- "0"
- line_start: 6
line_stop: 6
col_start: 14
col_stop: 15
path: compiler-test
content: " for i in 0..10 {"
stop:
Value:
Implicit:
- "10"
- line_start: 6
line_stop: 6
col_start: 17
col_stop: 19
path: compiler-test
content: " for i in 0..10 {"
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a += 1;\\\"}\"}"
accesses: []
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 10
path: compiler-test
content: " a += 1;"
value:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a += 1;\\\"}\"}"
right:
Value:
Implicit:
- "1"
- line_start: 7
line_stop: 7
col_start: 14
col_stop: 15
path: compiler-test
content: " a += 1;"
op: Add
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 15
path: compiler-test
content: " a += 1;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 15
path: compiler-test
content: " a += 1;"
span:
line_start: 6
line_stop: 8
col_start: 20
col_stop: 6
path: compiler-test
content: " for i in 0..10 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " for i in 0..10 {\n...\n }"
- Return:
expression:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 13
path: compiler-test
content: " return a;"
span:
line_start: 3
line_stop: 11
col_start: 29
col_stop: 2
path: compiler-test
content: "function iteration() -> u32 {\n...\n}"
span:
line_start: 3
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function iteration() -> u32 {\n...\n}\n\n\n\n\n\n"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"total\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":11,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const total = iteration() + iteration();\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 11
col_stop: 16
path: compiler-test
content: " const total = iteration() + iteration();"
type_: ~
value:
Binary:
left:
Call:
function:
Identifier: "{\"name\":\"iteration\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":19,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const total = iteration() + iteration();\\\"}\"}"
arguments: []
span:
line_start: 14
line_stop: 14
col_start: 19
col_stop: 30
path: compiler-test
content: " const total = iteration() + iteration();"
right:
Call:
function:
Identifier: "{\"name\":\"iteration\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":33,\\\"col_stop\\\":42,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const total = iteration() + iteration();\\\"}\"}"
arguments: []
span:
line_start: 14
line_stop: 14
col_start: 33
col_stop: 44
path: compiler-test
content: " const total = iteration() + iteration();"
op: Add
span:
line_start: 14
line_stop: 14
col_start: 19
col_stop: 44
path: compiler-test
content: " const total = iteration() + iteration();"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 44
path: compiler-test
content: " const total = iteration() + iteration();"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"total\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return total == 20 == y;\\\"}\"}"
right:
Value:
Implicit:
- "20"
- line_start: 16
line_stop: 16
col_start: 21
col_stop: 23
path: compiler-test
content: " return total == 20 == y;"
op: Eq
span:
line_start: 16
line_stop: 16
col_start: 12
col_stop: 23
path: compiler-test
content: " return total == 20 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return total == 20 == y;\\\"}\"}"
op: Eq
span:
line_start: 16
line_stop: 16
col_start: 12
col_stop: 28
path: compiler-test
content: " return total == 20 == y;"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 28
path: compiler-test
content: " return total == 20 == y;"
span:
line_start: 13
line_stop: 17
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 13
line_stop: 17
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"iteration\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function iteration() -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"iteration\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function iteration() -> u32 {\\\"}\"}"
input: []
output:
IntegerType: U32
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let a = 0u32;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 9
col_stop: 10
path: compiler-test
content: " let a = 0u32;"
type_:
IntegerType: U32
value:
Value:
Integer:
- U32
- "0"
- line_start: 4
line_stop: 4
col_start: 13
col_stop: 17
path: compiler-test
content: " let a = 0u32;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 17
path: compiler-test
content: " let a = 0u32;"
- Iteration:
variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" for i in 0..10 {\\\"}\"}"
start:
Value:
Integer:
- U32
- "0"
- line_start: 6
line_stop: 6
col_start: 14
col_stop: 15
path: compiler-test
content: " for i in 0..10 {"
stop:
Value:
Integer:
- U32
- "10"
- line_start: 6
line_stop: 6
col_start: 17
col_stop: 19
path: compiler-test
content: " for i in 0..10 {"
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a += 1;\\\"}\"}"
accesses: []
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 10
path: compiler-test
content: " a += 1;"
value:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a += 1;\\\"}\"}"
right:
Value:
Integer:
- U32
- "1"
- line_start: 7
line_stop: 7
col_start: 14
col_stop: 15
path: compiler-test
content: " a += 1;"
op: Add
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 15
path: compiler-test
content: " a += 1;"
span:
line_start: 7
line_stop: 7
col_start: 9
col_stop: 15
path: compiler-test
content: " a += 1;"
span:
line_start: 6
line_stop: 8
col_start: 20
col_stop: 6
path: compiler-test
content: " for i in 0..10 {\n...\n }"
span:
line_start: 6
line_stop: 8
col_start: 5
col_stop: 6
path: compiler-test
content: " for i in 0..10 {\n...\n }"
- Return:
expression:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a;\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 13
path: compiler-test
content: " return a;"
span:
line_start: 3
line_stop: 11
col_start: 29
col_stop: 2
path: compiler-test
content: "function iteration() -> u32 {\n...\n}"
span:
line_start: 3
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function iteration() -> u32 {\n...\n}\n\n\n\n\n\n"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"total\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":11,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const total = iteration() + iteration();\\\"}\"}"
span:
line_start: 14
line_stop: 14
col_start: 11
col_stop: 16
path: compiler-test
content: " const total = iteration() + iteration();"
type_:
IntegerType: U32
value:
Binary:
left:
Call:
function:
Identifier: "{\"name\":\"iteration\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":19,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const total = iteration() + iteration();\\\"}\"}"
arguments: []
span:
line_start: 14
line_stop: 14
col_start: 19
col_stop: 30
path: compiler-test
content: " const total = iteration() + iteration();"
right:
Call:
function:
Identifier: "{\"name\":\"iteration\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":33,\\\"col_stop\\\":42,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const total = iteration() + iteration();\\\"}\"}"
arguments: []
span:
line_start: 14
line_stop: 14
col_start: 33
col_stop: 44
path: compiler-test
content: " const total = iteration() + iteration();"
op: Add
span:
line_start: 14
line_stop: 14
col_start: 19
col_stop: 44
path: compiler-test
content: " const total = iteration() + iteration();"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 44
path: compiler-test
content: " const total = iteration() + iteration();"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"total\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return total == 20 == y;\\\"}\"}"
right:
Value:
Integer:
- U32
- "20"
- line_start: 16
line_stop: 16
col_start: 21
col_stop: 23
path: compiler-test
content: " return total == 20 == y;"
op: Eq
span:
line_start: 16
line_stop: 16
col_start: 12
col_stop: 23
path: compiler-test
content: " return total == 20 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return total == 20 == y;\\\"}\"}"
op: Eq
span:
line_start: 16
line_stop: 16
col_start: 12
col_stop: 28
path: compiler-test
content: " return total == 20 == y;"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 28
path: compiler-test
content: " return total == 20 == y;"
span:
line_start: 13
line_stop: 17
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 13
line_stop: 17
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"

View File

@ -16,3 +16,711 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuple() -> (bool, bool) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuple() -> (bool, bool) {\\\"}\"}"
input: []
output:
Tuple:
- Boolean
- Boolean
block:
statements:
- Return:
expression:
TupleInit:
elements:
- Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 13
col_stop: 17
path: compiler-test
content: " return (true, false);"
- Value:
Boolean:
- "false"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 24
path: compiler-test
content: " return (true, false);"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 25
path: compiler-test
content: " return (true, false);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 25
path: compiler-test
content: " return (true, false);"
span:
line_start: 3
line_stop: 5
col_start: 34
col_stop: 2
path: compiler-test
content: "function tuple() -> (bool, bool) {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function tuple() -> (bool, bool) {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (a, b) = tuple();\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 13
path: compiler-test
content: " const (a, b) = tuple();"
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (a, b) = tuple();\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 15
col_stop: 16
path: compiler-test
content: " const (a, b) = tuple();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":20,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (a, b) = tuple();\\\"}\"}"
arguments: []
span:
line_start: 8
line_stop: 8
col_start: 20
col_stop: 27
path: compiler-test
content: " const (a, b) = tuple();"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 27
path: compiler-test
content: " const (a, b) = tuple();"
- Return:
expression:
Binary:
left:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true && b == false && y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 10
line_stop: 10
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == true && b == false && y == true;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == true && b == false && y == true;"
right:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true && b == false && y == true;\\\"}\"}"
right:
Value:
Boolean:
- "false"
- line_start: 10
line_stop: 10
col_start: 30
col_stop: 35
path: compiler-test
content: " return a == true && b == false && y == true;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 25
col_stop: 35
path: compiler-test
content: " return a == true && b == false && y == true;"
op: And
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 35
path: compiler-test
content: " return a == true && b == false && y == true;"
right:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":39,\\\"col_stop\\\":40,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true && b == false && y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 10
line_stop: 10
col_start: 44
col_stop: 48
path: compiler-test
content: " return a == true && b == false && y == true;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 39
col_stop: 48
path: compiler-test
content: " return a == true && b == false && y == true;"
op: And
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 48
path: compiler-test
content: " return a == true && b == false && y == true;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 48
path: compiler-test
content: " return a == true && b == false && y == true;"
span:
line_start: 7
line_stop: 11
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuple() -> (bool, bool) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuple() -> (bool, bool) {\\\"}\"}"
input: []
output:
Tuple:
- Boolean
- Boolean
block:
statements:
- Return:
expression:
TupleInit:
elements:
- Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 13
col_stop: 17
path: compiler-test
content: " return (true, false);"
- Value:
Boolean:
- "false"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 24
path: compiler-test
content: " return (true, false);"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 25
path: compiler-test
content: " return (true, false);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 25
path: compiler-test
content: " return (true, false);"
span:
line_start: 3
line_stop: 5
col_start: 34
col_stop: 2
path: compiler-test
content: "function tuple() -> (bool, bool) {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function tuple() -> (bool, bool) {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (a, b) = tuple();\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 13
path: compiler-test
content: " const (a, b) = tuple();"
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (a, b) = tuple();\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 15
col_stop: 16
path: compiler-test
content: " const (a, b) = tuple();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":20,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (a, b) = tuple();\\\"}\"}"
arguments: []
span:
line_start: 8
line_stop: 8
col_start: 20
col_stop: 27
path: compiler-test
content: " const (a, b) = tuple();"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 27
path: compiler-test
content: " const (a, b) = tuple();"
- Return:
expression:
Binary:
left:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true && b == false && y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 10
line_stop: 10
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == true && b == false && y == true;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == true && b == false && y == true;"
right:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true && b == false && y == true;\\\"}\"}"
right:
Value:
Boolean:
- "false"
- line_start: 10
line_stop: 10
col_start: 30
col_stop: 35
path: compiler-test
content: " return a == true && b == false && y == true;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 25
col_stop: 35
path: compiler-test
content: " return a == true && b == false && y == true;"
op: And
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 35
path: compiler-test
content: " return a == true && b == false && y == true;"
right:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":39,\\\"col_stop\\\":40,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true && b == false && y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 10
line_stop: 10
col_start: 44
col_stop: 48
path: compiler-test
content: " return a == true && b == false && y == true;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 39
col_stop: 48
path: compiler-test
content: " return a == true && b == false && y == true;"
op: And
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 48
path: compiler-test
content: " return a == true && b == false && y == true;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 48
path: compiler-test
content: " return a == true && b == false && y == true;"
span:
line_start: 7
line_stop: 11
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuple() -> (bool, bool) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuple() -> (bool, bool) {\\\"}\"}"
input: []
output:
Tuple:
- Boolean
- Boolean
block:
statements:
- Return:
expression:
TupleInit:
elements:
- Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 13
col_stop: 17
path: compiler-test
content: " return (true, false);"
- Value:
Boolean:
- "false"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 24
path: compiler-test
content: " return (true, false);"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 25
path: compiler-test
content: " return (true, false);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 25
path: compiler-test
content: " return (true, false);"
span:
line_start: 3
line_stop: 5
col_start: 34
col_stop: 2
path: compiler-test
content: "function tuple() -> (bool, bool) {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function tuple() -> (bool, bool) {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (a, b) = tuple();\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 13
path: compiler-test
content: " const (a, b) = tuple();"
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (a, b) = tuple();\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 15
col_stop: 16
path: compiler-test
content: " const (a, b) = tuple();"
type_:
Tuple:
- Boolean
- Boolean
value:
Call:
function:
Identifier: "{\"name\":\"tuple\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":20,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (a, b) = tuple();\\\"}\"}"
arguments: []
span:
line_start: 8
line_stop: 8
col_start: 20
col_stop: 27
path: compiler-test
content: " const (a, b) = tuple();"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 27
path: compiler-test
content: " const (a, b) = tuple();"
- Return:
expression:
Binary:
left:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true && b == false && y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 10
line_stop: 10
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == true && b == false && y == true;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == true && b == false && y == true;"
right:
Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true && b == false && y == true;\\\"}\"}"
right:
Value:
Boolean:
- "false"
- line_start: 10
line_stop: 10
col_start: 30
col_stop: 35
path: compiler-test
content: " return a == true && b == false && y == true;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 25
col_stop: 35
path: compiler-test
content: " return a == true && b == false && y == true;"
op: And
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 35
path: compiler-test
content: " return a == true && b == false && y == true;"
right:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":39,\\\"col_stop\\\":40,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true && b == false && y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 10
line_stop: 10
col_start: 44
col_stop: 48
path: compiler-test
content: " return a == true && b == false && y == true;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 39
col_stop: 48
path: compiler-test
content: " return a == true && b == false && y == true;"
op: And
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 48
path: compiler-test
content: " return a == true && b == false && y == true;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 48
path: compiler-test
content: " return a == true && b == false && y == true;"
span:
line_start: 7
line_stop: 11
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"

View File

@ -19,3 +19,276 @@ outputs:
r1:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main() -> (bool, bool) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main() -> (bool, bool) {\\\"}\"}"
input: []
output:
Tuple:
- Boolean
- Boolean
block:
statements:
- Return:
expression:
TupleInit:
elements:
- CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 28
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
name: "{\"name\":\"r0\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 31
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
- CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":33,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":39,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 33
col_stop: 48
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
name: "{\"name\":\"r1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":49,\\\"col_stop\\\":51,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 33
col_stop: 51
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 52
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 52
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
span:
line_start: 3
line_stop: 5
col_start: 33
col_stop: 2
path: compiler-test
content: "function main() -> (bool, bool) {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main() -> (bool, bool) {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main() -> (bool, bool) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main() -> (bool, bool) {\\\"}\"}"
input: []
output:
Tuple:
- Boolean
- Boolean
block:
statements:
- Return:
expression:
TupleInit:
elements:
- CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 28
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
name: "{\"name\":\"r0\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 31
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
- CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":33,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":39,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 33
col_stop: 48
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
name: "{\"name\":\"r1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":49,\\\"col_stop\\\":51,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 33
col_stop: 51
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 52
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 52
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
span:
line_start: 3
line_stop: 5
col_start: 33
col_stop: 2
path: compiler-test
content: "function main() -> (bool, bool) {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main() -> (bool, bool) {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main() -> (bool, bool) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main() -> (bool, bool) {\\\"}\"}"
input: []
output:
Tuple:
- Boolean
- Boolean
block:
statements:
- Return:
expression:
TupleInit:
elements:
- CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":19,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 28
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
name: "{\"name\":\"r0\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":29,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 31
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
- CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":33,\\\"col_stop\\\":38,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":39,\\\"col_stop\\\":48,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 33
col_stop: 48
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
name: "{\"name\":\"r1\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":49,\\\"col_stop\\\":51,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (input.registers.r0, input.registers.r1);\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 33
col_stop: 51
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 52
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 52
path: compiler-test
content: " return (input.registers.r0, input.registers.r1);"
span:
line_start: 3
line_stop: 5
col_start: 33
col_stop: 2
path: compiler-test
content: "function main() -> (bool, bool) {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main() -> (bool, bool) {\n...\n}"

View File

@ -19,3 +19,234 @@ outputs:
b:
type: u32
value: "0"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u32,\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 6
path: compiler-test
content: " a: u32,"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b: u32,\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 6
path: compiler-test
content: " b: u32,"
output:
Tuple:
- IntegerType: U32
- IntegerType: U32
block:
statements:
- Return:
expression:
TupleInit:
elements:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a, b);\\\"}\"}"
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a, b);\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 18
path: compiler-test
content: " return (a, b);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 18
path: compiler-test
content: " return (a, b);"
span:
line_start: 9
line_stop: 11
col_start: 3
col_stop: 2
path: compiler-test
content: ") {\n...\n}"
span:
line_start: 3
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(\n...\n) {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u32,\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 6
path: compiler-test
content: " a: u32,"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b: u32,\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 6
path: compiler-test
content: " b: u32,"
output:
Tuple:
- IntegerType: U32
- IntegerType: U32
block:
statements:
- Return:
expression:
TupleInit:
elements:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a, b);\\\"}\"}"
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a, b);\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 18
path: compiler-test
content: " return (a, b);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 18
path: compiler-test
content: " return (a, b);"
span:
line_start: 9
line_stop: 11
col_start: 3
col_stop: 2
path: compiler-test
content: ") {\n...\n}"
span:
line_start: 3
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(\n...\n) {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" a: u32,\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 6
path: compiler-test
content: " a: u32,"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" b: u32,\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 6
path: compiler-test
content: " b: u32,"
output:
Tuple:
- IntegerType: U32
- IntegerType: U32
block:
statements:
- Return:
expression:
TupleInit:
elements:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a, b);\\\"}\"}"
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a, b);\\\"}\"}"
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 18
path: compiler-test
content: " return (a, b);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 18
path: compiler-test
content: " return (a, b);"
span:
line_start: 9
line_stop: 11
col_start: 3
col_stop: 2
path: compiler-test
content: ") {\n...\n}"
span:
line_start: 3
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(\n...\n) {\n...\n}"

View File

@ -16,3 +16,528 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> bool {\\\"}\"}"
input: []
output: Boolean
block:
statements:
- Return:
expression:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 12
col_stop: 16
path: compiler-test
content: " return true;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 16
path: compiler-test
content: " return true;"
span:
line_start: 3
line_stop: 5
col_start: 24
col_stop: 2
path: compiler-test
content: "function one() -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function one() -> bool {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = one() && one();\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = one() && one();"
type_: ~
value:
Binary:
left:
Call:
function:
Identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = one() && one();\\\"}\"}"
arguments: []
span:
line_start: 8
line_stop: 8
col_start: 15
col_stop: 20
path: compiler-test
content: " const a = one() && one();"
right:
Call:
function:
Identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":24,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = one() && one();\\\"}\"}"
arguments: []
span:
line_start: 8
line_stop: 8
col_start: 24
col_stop: 29
path: compiler-test
content: " const a = one() && one();"
op: And
span:
line_start: 8
line_stop: 8
col_start: 15
col_stop: 29
path: compiler-test
content: " const a = one() && one();"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 29
path: compiler-test
content: " const a = one() && one();"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true == y;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 10
line_stop: 10
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == true == y;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == true == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true == y;\\\"}\"}"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 26
path: compiler-test
content: " return a == true == y;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 26
path: compiler-test
content: " return a == true == y;"
span:
line_start: 7
line_stop: 11
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> bool {\\\"}\"}"
input: []
output: Boolean
block:
statements:
- Return:
expression:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 12
col_stop: 16
path: compiler-test
content: " return true;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 16
path: compiler-test
content: " return true;"
span:
line_start: 3
line_stop: 5
col_start: 24
col_stop: 2
path: compiler-test
content: "function one() -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function one() -> bool {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = one() && one();\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = one() && one();"
type_: ~
value:
Binary:
left:
Call:
function:
Identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = one() && one();\\\"}\"}"
arguments: []
span:
line_start: 8
line_stop: 8
col_start: 15
col_stop: 20
path: compiler-test
content: " const a = one() && one();"
right:
Call:
function:
Identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":24,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = one() && one();\\\"}\"}"
arguments: []
span:
line_start: 8
line_stop: 8
col_start: 24
col_stop: 29
path: compiler-test
content: " const a = one() && one();"
op: And
span:
line_start: 8
line_stop: 8
col_start: 15
col_stop: 29
path: compiler-test
content: " const a = one() && one();"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 29
path: compiler-test
content: " const a = one() && one();"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true == y;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 10
line_stop: 10
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == true == y;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == true == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true == y;\\\"}\"}"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 26
path: compiler-test
content: " return a == true == y;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 26
path: compiler-test
content: " return a == true == y;"
span:
line_start: 7
line_stop: 11
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> bool {\\\"}\"}"
input: []
output: Boolean
block:
statements:
- Return:
expression:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 12
col_stop: 16
path: compiler-test
content: " return true;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 16
path: compiler-test
content: " return true;"
span:
line_start: 3
line_stop: 5
col_start: 24
col_stop: 2
path: compiler-test
content: "function one() -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function one() -> bool {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = one() && one();\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = one() && one();"
type_: Boolean
value:
Binary:
left:
Call:
function:
Identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = one() && one();\\\"}\"}"
arguments: []
span:
line_start: 8
line_stop: 8
col_start: 15
col_stop: 20
path: compiler-test
content: " const a = one() && one();"
right:
Call:
function:
Identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":24,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = one() && one();\\\"}\"}"
arguments: []
span:
line_start: 8
line_stop: 8
col_start: 24
col_stop: 29
path: compiler-test
content: " const a = one() && one();"
op: And
span:
line_start: 8
line_stop: 8
col_start: 15
col_stop: 29
path: compiler-test
content: " const a = one() && one();"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 29
path: compiler-test
content: " const a = one() && one();"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true == y;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 10
line_stop: 10
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == true == y;"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == true == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true == y;\\\"}\"}"
op: Eq
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 26
path: compiler-test
content: " return a == true == y;"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 26
path: compiler-test
content: " return a == true == y;"
span:
line_start: 7
line_stop: 11
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 11
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"

View File

@ -16,3 +16,405 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> u32 {\\\"}\"}"
input: []
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "1"
- line_start: 4
line_stop: 4
col_start: 12
col_stop: 16
path: compiler-test
content: " return 1u32;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 16
path: compiler-test
content: " return 1u32;"
span:
line_start: 3
line_stop: 5
col_start: 23
col_stop: 2
path: compiler-test
content: "function one() -> u32 {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function one() -> u32 {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Call:
function:
Identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return one() == 1u32 == y;\\\"}\"}"
arguments: []
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 17
path: compiler-test
content: " return one() == 1u32 == y;"
right:
Value:
Integer:
- U32
- "1"
- line_start: 8
line_stop: 8
col_start: 21
col_stop: 25
path: compiler-test
content: " return one() == 1u32 == y;"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 25
path: compiler-test
content: " return one() == 1u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return one() == 1u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 30
path: compiler-test
content: " return one() == 1u32 == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 30
path: compiler-test
content: " return one() == 1u32 == y;"
span:
line_start: 7
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> u32 {\\\"}\"}"
input: []
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "1"
- line_start: 4
line_stop: 4
col_start: 12
col_stop: 16
path: compiler-test
content: " return 1u32;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 16
path: compiler-test
content: " return 1u32;"
span:
line_start: 3
line_stop: 5
col_start: 23
col_stop: 2
path: compiler-test
content: "function one() -> u32 {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function one() -> u32 {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Call:
function:
Identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return one() == 1u32 == y;\\\"}\"}"
arguments: []
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 17
path: compiler-test
content: " return one() == 1u32 == y;"
right:
Value:
Integer:
- U32
- "1"
- line_start: 8
line_stop: 8
col_start: 21
col_stop: 25
path: compiler-test
content: " return one() == 1u32 == y;"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 25
path: compiler-test
content: " return one() == 1u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return one() == 1u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 30
path: compiler-test
content: " return one() == 1u32 == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 30
path: compiler-test
content: " return one() == 1u32 == y;"
span:
line_start: 7
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> u32 {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function one() -> u32 {\\\"}\"}"
input: []
output:
IntegerType: U32
block:
statements:
- Return:
expression:
Value:
Integer:
- U32
- "1"
- line_start: 4
line_stop: 4
col_start: 12
col_stop: 16
path: compiler-test
content: " return 1u32;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 16
path: compiler-test
content: " return 1u32;"
span:
line_start: 3
line_stop: 5
col_start: 23
col_stop: 2
path: compiler-test
content: "function one() -> u32 {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function one() -> u32 {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 7
line_stop: 7
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Call:
function:
Identifier: "{\"name\":\"one\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return one() == 1u32 == y;\\\"}\"}"
arguments: []
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 17
path: compiler-test
content: " return one() == 1u32 == y;"
right:
Value:
Integer:
- U32
- "1"
- line_start: 8
line_stop: 8
col_start: 21
col_stop: 25
path: compiler-test
content: " return one() == 1u32 == y;"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 25
path: compiler-test
content: " return one() == 1u32 == y;"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return one() == 1u32 == y;\\\"}\"}"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 30
path: compiler-test
content: " return one() == 1u32 == y;"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 30
path: compiler-test
content: " return one() == 1u32 == y;"
span:
line_start: 7
line_stop: 9
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 7
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"

View File

@ -16,3 +16,807 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_nested() -> [[u8; 2]; 3] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_nested() -> [[u8; 2]; 3] {\\\"}\"}"
input: []
output:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
block:
statements:
- Return:
expression:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 14
col_stop: 17
path: compiler-test
content: " return [[0u8; 2]; 3];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 21
path: compiler-test
content: " return [[0u8; 2]; 3];"
dimensions:
- value: "3"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 25
path: compiler-test
content: " return [[0u8; 2]; 3];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 25
path: compiler-test
content: " return [[0u8; 2]; 3];"
span:
line_start: 3
line_stop: 5
col_start: 45
col_stop: 2
path: compiler-test
content: "function array_3x2_nested() -> [[u8; 2]; 3] {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function array_3x2_nested() -> [[u8; 2]; 3] {\n...\n}"
"{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_tuple() -> [[u8; 2]; 3] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_tuple() -> [[u8; 2]; 3] {\\\"}\"}"
input: []
output:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
block:
statements:
- Return:
expression:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 8
line_stop: 8
col_start: 13
col_stop: 16
path: compiler-test
content: " return [0u8; (3, 2)];"
dimensions:
- value: "3"
- value: "2"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
span:
line_start: 7
line_stop: 9
col_start: 44
col_stop: 2
path: compiler-test
content: "function array_3x2_tuple() -> [[u8; 2]; 3] {\n...\n}"
span:
line_start: 7
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function array_3x2_tuple() -> [[u8; 2]; 3] {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = array_3x2_nested();\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = array_3x2_nested();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = array_3x2_nested();\\\"}\"}"
arguments: []
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 33
path: compiler-test
content: " const a = array_3x2_nested();"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 33
path: compiler-test
content: " const a = array_3x2_nested();"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = array_3x2_tuple();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = array_3x2_tuple();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = array_3x2_tuple();\\\"}\"}"
arguments: []
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 32
path: compiler-test
content: " const b = array_3x2_tuple();"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 32
path: compiler-test
content: " const b = array_3x2_tuple();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 14
line_stop: 14
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 11
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_nested() -> [[u8; 2]; 3] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_nested() -> [[u8; 2]; 3] {\\\"}\"}"
input: []
output:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
block:
statements:
- Return:
expression:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 14
col_stop: 17
path: compiler-test
content: " return [[0u8; 2]; 3];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 21
path: compiler-test
content: " return [[0u8; 2]; 3];"
dimensions:
- value: "3"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 25
path: compiler-test
content: " return [[0u8; 2]; 3];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 25
path: compiler-test
content: " return [[0u8; 2]; 3];"
span:
line_start: 3
line_stop: 5
col_start: 45
col_stop: 2
path: compiler-test
content: "function array_3x2_nested() -> [[u8; 2]; 3] {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function array_3x2_nested() -> [[u8; 2]; 3] {\n...\n}"
"{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_tuple() -> [[u8; 2]; 3] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_tuple() -> [[u8; 2]; 3] {\\\"}\"}"
input: []
output:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
block:
statements:
- Return:
expression:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 8
line_stop: 8
col_start: 13
col_stop: 16
path: compiler-test
content: " return [0u8; (3, 2)];"
dimensions:
- value: "2"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
dimensions:
- value: "3"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
span:
line_start: 7
line_stop: 9
col_start: 44
col_stop: 2
path: compiler-test
content: "function array_3x2_tuple() -> [[u8; 2]; 3] {\n...\n}"
span:
line_start: 7
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function array_3x2_tuple() -> [[u8; 2]; 3] {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = array_3x2_nested();\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = array_3x2_nested();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = array_3x2_nested();\\\"}\"}"
arguments: []
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 33
path: compiler-test
content: " const a = array_3x2_nested();"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 33
path: compiler-test
content: " const a = array_3x2_nested();"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = array_3x2_tuple();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = array_3x2_tuple();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = array_3x2_tuple();\\\"}\"}"
arguments: []
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 32
path: compiler-test
content: " const b = array_3x2_tuple();"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 32
path: compiler-test
content: " const b = array_3x2_tuple();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 14
line_stop: 14
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 11
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_nested() -> [[u8; 2]; 3] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_nested() -> [[u8; 2]; 3] {\\\"}\"}"
input: []
output:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
block:
statements:
- Return:
expression:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 14
col_stop: 17
path: compiler-test
content: " return [[0u8; 2]; 3];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 21
path: compiler-test
content: " return [[0u8; 2]; 3];"
dimensions:
- value: "3"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 25
path: compiler-test
content: " return [[0u8; 2]; 3];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 25
path: compiler-test
content: " return [[0u8; 2]; 3];"
span:
line_start: 3
line_stop: 5
col_start: 45
col_stop: 2
path: compiler-test
content: "function array_3x2_nested() -> [[u8; 2]; 3] {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function array_3x2_nested() -> [[u8; 2]; 3] {\n...\n}"
"{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_tuple() -> [[u8; 2]; 3] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_tuple() -> [[u8; 2]; 3] {\\\"}\"}"
input: []
output:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
block:
statements:
- Return:
expression:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 8
line_stop: 8
col_start: 13
col_stop: 16
path: compiler-test
content: " return [0u8; (3, 2)];"
dimensions:
- value: "2"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
dimensions:
- value: "3"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
span:
line_start: 7
line_stop: 9
col_start: 44
col_stop: 2
path: compiler-test
content: "function array_3x2_tuple() -> [[u8; 2]; 3] {\n...\n}"
span:
line_start: 7
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function array_3x2_tuple() -> [[u8; 2]; 3] {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = array_3x2_nested();\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = array_3x2_nested();"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
Call:
function:
Identifier: "{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = array_3x2_nested();\\\"}\"}"
arguments: []
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 33
path: compiler-test
content: " const a = array_3x2_nested();"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 33
path: compiler-test
content: " const a = array_3x2_nested();"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = array_3x2_tuple();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = array_3x2_tuple();"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
Call:
function:
Identifier: "{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = array_3x2_tuple();\\\"}\"}"
arguments: []
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 32
path: compiler-test
content: " const b = array_3x2_tuple();"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 32
path: compiler-test
content: " const b = array_3x2_tuple();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 14
line_stop: 14
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 11
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"

View File

@ -16,3 +16,805 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_nested() -> [u8; (3, 2)] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_nested() -> [u8; (3, 2)] {\\\"}\"}"
input: []
output:
Array:
- IntegerType: U8
- - value: "3"
- value: "2"
block:
statements:
- Return:
expression:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 14
col_stop: 17
path: compiler-test
content: " return [[0u8; 2]; 3];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 21
path: compiler-test
content: " return [[0u8; 2]; 3];"
dimensions:
- value: "3"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 25
path: compiler-test
content: " return [[0u8; 2]; 3];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 25
path: compiler-test
content: " return [[0u8; 2]; 3];"
span:
line_start: 3
line_stop: 5
col_start: 45
col_stop: 2
path: compiler-test
content: "function array_3x2_nested() -> [u8; (3, 2)] {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function array_3x2_nested() -> [u8; (3, 2)] {\n...\n}"
"{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_tuple() -> [u8; (3, 2)] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_tuple() -> [u8; (3, 2)] {\\\"}\"}"
input: []
output:
Array:
- IntegerType: U8
- - value: "3"
- value: "2"
block:
statements:
- Return:
expression:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 8
line_stop: 8
col_start: 13
col_stop: 16
path: compiler-test
content: " return [0u8; (3, 2)];"
dimensions:
- value: "3"
- value: "2"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
span:
line_start: 7
line_stop: 9
col_start: 44
col_stop: 2
path: compiler-test
content: "function array_3x2_tuple() -> [u8; (3, 2)] {\n...\n}"
span:
line_start: 7
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function array_3x2_tuple() -> [u8; (3, 2)] {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = array_3x2_nested();\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = array_3x2_nested();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = array_3x2_nested();\\\"}\"}"
arguments: []
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 33
path: compiler-test
content: " const a = array_3x2_nested();"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 33
path: compiler-test
content: " const a = array_3x2_nested();"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = array_3x2_tuple();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = array_3x2_tuple();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = array_3x2_tuple();\\\"}\"}"
arguments: []
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 32
path: compiler-test
content: " const b = array_3x2_tuple();"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 32
path: compiler-test
content: " const b = array_3x2_tuple();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 14
line_stop: 14
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 11
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_nested() -> [u8; (3, 2)] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_nested() -> [u8; (3, 2)] {\\\"}\"}"
input: []
output:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
block:
statements:
- Return:
expression:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 14
col_stop: 17
path: compiler-test
content: " return [[0u8; 2]; 3];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 21
path: compiler-test
content: " return [[0u8; 2]; 3];"
dimensions:
- value: "3"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 25
path: compiler-test
content: " return [[0u8; 2]; 3];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 25
path: compiler-test
content: " return [[0u8; 2]; 3];"
span:
line_start: 3
line_stop: 5
col_start: 45
col_stop: 2
path: compiler-test
content: "function array_3x2_nested() -> [u8; (3, 2)] {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function array_3x2_nested() -> [u8; (3, 2)] {\n...\n}"
"{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_tuple() -> [u8; (3, 2)] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_tuple() -> [u8; (3, 2)] {\\\"}\"}"
input: []
output:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
block:
statements:
- Return:
expression:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 8
line_stop: 8
col_start: 13
col_stop: 16
path: compiler-test
content: " return [0u8; (3, 2)];"
dimensions:
- value: "2"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
dimensions:
- value: "3"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
span:
line_start: 7
line_stop: 9
col_start: 44
col_stop: 2
path: compiler-test
content: "function array_3x2_tuple() -> [u8; (3, 2)] {\n...\n}"
span:
line_start: 7
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function array_3x2_tuple() -> [u8; (3, 2)] {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = array_3x2_nested();\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = array_3x2_nested();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = array_3x2_nested();\\\"}\"}"
arguments: []
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 33
path: compiler-test
content: " const a = array_3x2_nested();"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 33
path: compiler-test
content: " const a = array_3x2_nested();"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = array_3x2_tuple();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = array_3x2_tuple();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = array_3x2_tuple();\\\"}\"}"
arguments: []
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 32
path: compiler-test
content: " const b = array_3x2_tuple();"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 32
path: compiler-test
content: " const b = array_3x2_tuple();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 14
line_stop: 14
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 11
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_nested() -> [u8; (3, 2)] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_nested() -> [u8; (3, 2)] {\\\"}\"}"
input: []
output:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
block:
statements:
- Return:
expression:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 4
line_stop: 4
col_start: 14
col_stop: 17
path: compiler-test
content: " return [[0u8; 2]; 3];"
dimensions:
- value: "2"
span:
line_start: 4
line_stop: 4
col_start: 13
col_stop: 21
path: compiler-test
content: " return [[0u8; 2]; 3];"
dimensions:
- value: "3"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 25
path: compiler-test
content: " return [[0u8; 2]; 3];"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 25
path: compiler-test
content: " return [[0u8; 2]; 3];"
span:
line_start: 3
line_stop: 5
col_start: 45
col_stop: 2
path: compiler-test
content: "function array_3x2_nested() -> [u8; (3, 2)] {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function array_3x2_nested() -> [u8; (3, 2)] {\n...\n}"
"{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_tuple() -> [u8; (3, 2)] {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function array_3x2_tuple() -> [u8; (3, 2)] {\\\"}\"}"
input: []
output:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
block:
statements:
- Return:
expression:
ArrayInit:
element:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 8
line_stop: 8
col_start: 13
col_stop: 16
path: compiler-test
content: " return [0u8; (3, 2)];"
dimensions:
- value: "2"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
dimensions:
- value: "3"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 25
path: compiler-test
content: " return [0u8; (3, 2)];"
span:
line_start: 7
line_stop: 9
col_start: 44
col_stop: 2
path: compiler-test
content: "function array_3x2_tuple() -> [u8; (3, 2)] {\n...\n}"
span:
line_start: 7
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function array_3x2_tuple() -> [u8; (3, 2)] {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = array_3x2_nested();\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = array_3x2_nested();"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
Call:
function:
Identifier: "{\"name\":\"array_3x2_nested\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":15,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = array_3x2_nested();\\\"}\"}"
arguments: []
span:
line_start: 12
line_stop: 12
col_start: 15
col_stop: 33
path: compiler-test
content: " const a = array_3x2_nested();"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 33
path: compiler-test
content: " const a = array_3x2_nested();"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = array_3x2_tuple();\\\"}\"}"
span:
line_start: 13
line_stop: 13
col_start: 11
col_stop: 12
path: compiler-test
content: " const b = array_3x2_tuple();"
type_:
Array:
- Array:
- IntegerType: U8
- - value: "2"
- - value: "3"
value:
Call:
function:
Identifier: "{\"name\":\"array_3x2_tuple\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":15,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b = array_3x2_tuple();\\\"}\"}"
arguments: []
span:
line_start: 13
line_stop: 13
col_start: 15
col_stop: 32
path: compiler-test
content: " const b = array_3x2_tuple();"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 32
path: compiler-test
content: " const b = array_3x2_tuple();"
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 14
line_stop: 14
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true;"
op: Eq
span:
line_start: 14
line_stop: 14
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 14
line_stop: 14
col_start: 5
col_stop: 21
path: compiler-test
content: " return y == true;"
span:
line_start: 11
line_stop: 15
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 11
line_stop: 15
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n"

View File

@ -19,3 +19,752 @@ outputs:
r1:
type: u32
value: "103"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"tuples\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuples() -> ((u8, u8), u32) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"tuples\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuples() -> ((u8, u8), u32) {\\\"}\"}"
input: []
output:
Tuple:
- Tuple:
- IntegerType: U8
- IntegerType: U8
- IntegerType: U32
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a: (u8, u8) = (1, 2);\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
type_:
Tuple:
- IntegerType: U8
- IntegerType: U8
value:
TupleInit:
elements:
- Value:
Implicit:
- "1"
- line_start: 5
line_stop: 5
col_start: 26
col_stop: 27
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
- Value:
Implicit:
- "2"
- line_start: 5
line_stop: 5
col_start: 29
col_stop: 30
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
span:
line_start: 5
line_stop: 5
col_start: 25
col_stop: 31
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 31
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: u32 = 3;\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: u32 = 3;"
type_:
IntegerType: U32
value:
Value:
Implicit:
- "3"
- line_start: 6
line_stop: 6
col_start: 20
col_stop: 21
path: compiler-test
content: " const b: u32 = 3;"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 21
path: compiler-test
content: " const b: u32 = 3;"
- Return:
expression:
TupleInit:
elements:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a, b);\\\"}\"}"
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a, b);\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return (a, b);"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 18
path: compiler-test
content: " return (a, b);"
span:
line_start: 4
line_stop: 9
col_start: 38
col_stop: 2
path: compiler-test
content: "function tuples() -> ((u8, u8), u32) {\n...\n}"
span:
line_start: 4
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function tuples() -> ((u8, u8), u32) {\n...\n}\n\n\n"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> ((u8, u8), u32) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> ((u8, u8), u32) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> ((u8, u8), u32) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32) -> ((u8, u8), u32) {"
output:
Tuple:
- Tuple:
- IntegerType: U8
- IntegerType: U8
- IntegerType: U32
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"t1\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (t1, b) = tuples();\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 12
col_stop: 14
path: compiler-test
content: " const (t1, b) = tuples();"
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (t1, b) = tuples();\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 16
col_stop: 17
path: compiler-test
content: " const (t1, b) = tuples();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"tuples\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (t1, b) = tuples();\\\"}\"}"
arguments: []
span:
line_start: 12
line_stop: 12
col_start: 21
col_stop: 29
path: compiler-test
content: " const (t1, b) = tuples();"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 29
path: compiler-test
content: " const (t1, b) = tuples();"
- Return:
expression:
TupleInit:
elements:
- Identifier: "{\"name\":\"t1\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (t1, a + b);\\\"}\"}"
- Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (t1, a + b);\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (t1, a + b);\\\"}\"}"
op: Add
span:
line_start: 13
line_stop: 13
col_start: 17
col_stop: 22
path: compiler-test
content: " return (t1, a + b);"
span:
line_start: 13
line_stop: 13
col_start: 12
col_stop: 23
path: compiler-test
content: " return (t1, a + b);"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 23
path: compiler-test
content: " return (t1, a + b);"
span:
line_start: 11
line_stop: 14
col_start: 42
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> ((u8, u8), u32) {\n...\n}"
span:
line_start: 11
line_stop: 14
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> ((u8, u8), u32) {\n...\n}\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"tuples\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuples() -> ((u8, u8), u32) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"tuples\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuples() -> ((u8, u8), u32) {\\\"}\"}"
input: []
output:
Tuple:
- Tuple:
- IntegerType: U8
- IntegerType: U8
- IntegerType: U32
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a: (u8, u8) = (1, 2);\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
type_:
Tuple:
- IntegerType: U8
- IntegerType: U8
value:
TupleInit:
elements:
- Value:
Implicit:
- "1"
- line_start: 5
line_stop: 5
col_start: 26
col_stop: 27
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
- Value:
Implicit:
- "2"
- line_start: 5
line_stop: 5
col_start: 29
col_stop: 30
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
span:
line_start: 5
line_stop: 5
col_start: 25
col_stop: 31
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 31
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: u32 = 3;\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: u32 = 3;"
type_:
IntegerType: U32
value:
Value:
Implicit:
- "3"
- line_start: 6
line_stop: 6
col_start: 20
col_stop: 21
path: compiler-test
content: " const b: u32 = 3;"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 21
path: compiler-test
content: " const b: u32 = 3;"
- Return:
expression:
TupleInit:
elements:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a, b);\\\"}\"}"
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a, b);\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return (a, b);"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 18
path: compiler-test
content: " return (a, b);"
span:
line_start: 4
line_stop: 9
col_start: 38
col_stop: 2
path: compiler-test
content: "function tuples() -> ((u8, u8), u32) {\n...\n}"
span:
line_start: 4
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function tuples() -> ((u8, u8), u32) {\n...\n}\n\n\n"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> ((u8, u8), u32) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> ((u8, u8), u32) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> ((u8, u8), u32) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32) -> ((u8, u8), u32) {"
output:
Tuple:
- Tuple:
- IntegerType: U8
- IntegerType: U8
- IntegerType: U32
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"t1\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (t1, b) = tuples();\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 12
col_stop: 14
path: compiler-test
content: " const (t1, b) = tuples();"
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (t1, b) = tuples();\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 16
col_stop: 17
path: compiler-test
content: " const (t1, b) = tuples();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"tuples\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (t1, b) = tuples();\\\"}\"}"
arguments: []
span:
line_start: 12
line_stop: 12
col_start: 21
col_stop: 29
path: compiler-test
content: " const (t1, b) = tuples();"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 29
path: compiler-test
content: " const (t1, b) = tuples();"
- Return:
expression:
TupleInit:
elements:
- Identifier: "{\"name\":\"t1\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (t1, a + b);\\\"}\"}"
- Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (t1, a + b);\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (t1, a + b);\\\"}\"}"
op: Add
span:
line_start: 13
line_stop: 13
col_start: 17
col_stop: 22
path: compiler-test
content: " return (t1, a + b);"
span:
line_start: 13
line_stop: 13
col_start: 12
col_stop: 23
path: compiler-test
content: " return (t1, a + b);"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 23
path: compiler-test
content: " return (t1, a + b);"
span:
line_start: 11
line_stop: 14
col_start: 42
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> ((u8, u8), u32) {\n...\n}"
span:
line_start: 11
line_stop: 14
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> ((u8, u8), u32) {\n...\n}\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"tuples\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuples() -> ((u8, u8), u32) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"tuples\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuples() -> ((u8, u8), u32) {\\\"}\"}"
input: []
output:
Tuple:
- Tuple:
- IntegerType: U8
- IntegerType: U8
- IntegerType: U32
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a: (u8, u8) = (1, 2);\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 12
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
type_:
Tuple:
- IntegerType: U8
- IntegerType: U8
value:
TupleInit:
elements:
- Value:
Integer:
- U8
- "1"
- line_start: 5
line_stop: 5
col_start: 26
col_stop: 27
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
- Value:
Integer:
- U8
- "2"
- line_start: 5
line_stop: 5
col_start: 29
col_stop: 30
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
span:
line_start: 5
line_stop: 5
col_start: 25
col_stop: 31
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 31
path: compiler-test
content: " const a: (u8, u8) = (1, 2);"
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const b: u32 = 3;\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 11
col_stop: 12
path: compiler-test
content: " const b: u32 = 3;"
type_:
IntegerType: U32
value:
Value:
Integer:
- U32
- "3"
- line_start: 6
line_stop: 6
col_start: 20
col_stop: 21
path: compiler-test
content: " const b: u32 = 3;"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 21
path: compiler-test
content: " const b: u32 = 3;"
- Return:
expression:
TupleInit:
elements:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a, b);\\\"}\"}"
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a, b);\\\"}\"}"
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 18
path: compiler-test
content: " return (a, b);"
span:
line_start: 8
line_stop: 8
col_start: 5
col_stop: 18
path: compiler-test
content: " return (a, b);"
span:
line_start: 4
line_stop: 9
col_start: 38
col_stop: 2
path: compiler-test
content: "function tuples() -> ((u8, u8), u32) {\n...\n}"
span:
line_start: 4
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function tuples() -> ((u8, u8), u32) {\n...\n}\n\n\n"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> ((u8, u8), u32) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> ((u8, u8), u32) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32) -> ((u8, u8), u32) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 11
line_stop: 11
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32) -> ((u8, u8), u32) {"
output:
Tuple:
- Tuple:
- IntegerType: U8
- IntegerType: U8
- IntegerType: U32
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"t1\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":12,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (t1, b) = tuples();\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 12
col_stop: 14
path: compiler-test
content: " const (t1, b) = tuples();"
- mutable: false
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (t1, b) = tuples();\\\"}\"}"
span:
line_start: 12
line_stop: 12
col_start: 16
col_stop: 17
path: compiler-test
content: " const (t1, b) = tuples();"
type_:
Tuple:
- Tuple:
- IntegerType: U8
- IntegerType: U8
- IntegerType: U32
value:
Call:
function:
Identifier: "{\"name\":\"tuples\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const (t1, b) = tuples();\\\"}\"}"
arguments: []
span:
line_start: 12
line_stop: 12
col_start: 21
col_stop: 29
path: compiler-test
content: " const (t1, b) = tuples();"
span:
line_start: 12
line_stop: 12
col_start: 5
col_stop: 29
path: compiler-test
content: " const (t1, b) = tuples();"
- Return:
expression:
TupleInit:
elements:
- Identifier: "{\"name\":\"t1\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (t1, a + b);\\\"}\"}"
- Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (t1, a + b);\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (t1, a + b);\\\"}\"}"
op: Add
span:
line_start: 13
line_stop: 13
col_start: 17
col_stop: 22
path: compiler-test
content: " return (t1, a + b);"
span:
line_start: 13
line_stop: 13
col_start: 12
col_stop: 23
path: compiler-test
content: " return (t1, a + b);"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 23
path: compiler-test
content: " return (t1, a + b);"
span:
line_start: 11
line_stop: 14
col_start: 42
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> ((u8, u8), u32) {\n...\n}"
span:
line_start: 11
line_stop: 14
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32) -> ((u8, u8), u32) {\n...\n}\n"

View File

@ -19,3 +19,835 @@ outputs:
b:
type: u32
value: "1"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"tuple_conditional\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuple_conditional () -> (\\\"}\"}":
annotations: []
identifier: "{\"name\":\"tuple_conditional\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuple_conditional () -> (\\\"}\"}"
input: []
output:
Tuple:
- IntegerType: U32
- IntegerType: U32
block:
statements:
- Conditional:
condition:
Value:
Boolean:
- "true"
- line_start: 8
line_stop: 8
col_start: 8
col_stop: 12
path: compiler-test
content: " if true {"
block:
statements:
- Return:
expression:
TupleInit:
elements:
- Value:
Implicit:
- "1"
- line_start: 9
line_stop: 9
col_start: 17
col_stop: 18
path: compiler-test
content: " return (1, 1);"
- Value:
Implicit:
- "1"
- line_start: 9
line_stop: 9
col_start: 20
col_stop: 21
path: compiler-test
content: " return (1, 1);"
span:
line_start: 9
line_stop: 9
col_start: 16
col_stop: 22
path: compiler-test
content: " return (1, 1);"
span:
line_start: 9
line_stop: 9
col_start: 9
col_stop: 22
path: compiler-test
content: " return (1, 1);"
span:
line_start: 8
line_stop: 10
col_start: 13
col_stop: 6
path: compiler-test
content: " if true {\n...\n } else {"
next:
Block:
statements:
- Return:
expression:
TupleInit:
elements:
- Value:
Implicit:
- "2"
- line_start: 11
line_stop: 11
col_start: 17
col_stop: 18
path: compiler-test
content: " return (2, 2);"
- Value:
Implicit:
- "2"
- line_start: 11
line_stop: 11
col_start: 20
col_stop: 21
path: compiler-test
content: " return (2, 2);"
span:
line_start: 11
line_stop: 11
col_start: 16
col_stop: 22
path: compiler-test
content: " return (2, 2);"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 22
path: compiler-test
content: " return (2, 2);"
span:
line_start: 10
line_stop: 12
col_start: 12
col_stop: 6
path: compiler-test
content: " } else {\n...\n }"
span:
line_start: 8
line_stop: 12
col_start: 5
col_stop: 6
path: compiler-test
content: " if true {\n...\n } else {\n...\n }"
span:
line_start: 7
line_stop: 13
col_start: 3
col_stop: 2
path: compiler-test
content: ") {\n...\n}"
span:
line_start: 4
line_stop: 13
col_start: 1
col_stop: 2
path: compiler-test
content: "function tuple_conditional () -> (\n...\n) {\n...\n}\n\n\n\n"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> (u32, u32) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> (u32, u32) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> (u32, u32) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 15
line_stop: 15
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32, b: u32) -> (u32, u32) {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> (u32, u32) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 15
line_stop: 15
col_start: 23
col_stop: 24
path: compiler-test
content: "function main(a: u32, b: u32) -> (u32, u32) {"
output:
Tuple:
- IntegerType: U32
- IntegerType: U32
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a1\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a1, b1) = tuple_conditional();\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 10
col_stop: 12
path: compiler-test
content: " let (a1, b1) = tuple_conditional();"
- mutable: true
identifier: "{\"name\":\"b1\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":14,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a1, b1) = tuple_conditional();\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 14
col_stop: 16
path: compiler-test
content: " let (a1, b1) = tuple_conditional();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"tuple_conditional\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":20,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a1, b1) = tuple_conditional();\\\"}\"}"
arguments: []
span:
line_start: 16
line_stop: 16
col_start: 20
col_stop: 39
path: compiler-test
content: " let (a1, b1) = tuple_conditional();"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 39
path: compiler-test
content: " let (a1, b1) = tuple_conditional();"
- Return:
expression:
TupleInit:
elements:
- Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a + a1, b + b1);\\\"}\"}"
right:
Identifier: "{\"name\":\"a1\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a + a1, b + b1);\\\"}\"}"
op: Add
span:
line_start: 18
line_stop: 18
col_start: 13
col_stop: 19
path: compiler-test
content: " return (a + a1, b + b1);"
- Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a + a1, b + b1);\\\"}\"}"
right:
Identifier: "{\"name\":\"b1\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":25,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a + a1, b + b1);\\\"}\"}"
op: Add
span:
line_start: 18
line_stop: 18
col_start: 21
col_stop: 27
path: compiler-test
content: " return (a + a1, b + b1);"
span:
line_start: 18
line_stop: 18
col_start: 12
col_stop: 28
path: compiler-test
content: " return (a + a1, b + b1);"
span:
line_start: 18
line_stop: 18
col_start: 5
col_stop: 28
path: compiler-test
content: " return (a + a1, b + b1);"
span:
line_start: 15
line_stop: 19
col_start: 45
col_stop: 2
path: compiler-test
content: "function main(a: u32, b: u32) -> (u32, u32) {\n...\n}"
span:
line_start: 15
line_stop: 19
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32, b: u32) -> (u32, u32) {\n...\n}\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"tuple_conditional\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuple_conditional () -> (\\\"}\"}":
annotations: []
identifier: "{\"name\":\"tuple_conditional\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuple_conditional () -> (\\\"}\"}"
input: []
output:
Tuple:
- IntegerType: U32
- IntegerType: U32
block:
statements:
- Conditional:
condition:
Value:
Boolean:
- "true"
- line_start: 8
line_stop: 8
col_start: 8
col_stop: 12
path: compiler-test
content: " if true {"
block:
statements:
- Return:
expression:
TupleInit:
elements:
- Value:
Implicit:
- "1"
- line_start: 9
line_stop: 9
col_start: 17
col_stop: 18
path: compiler-test
content: " return (1, 1);"
- Value:
Implicit:
- "1"
- line_start: 9
line_stop: 9
col_start: 20
col_stop: 21
path: compiler-test
content: " return (1, 1);"
span:
line_start: 9
line_stop: 9
col_start: 16
col_stop: 22
path: compiler-test
content: " return (1, 1);"
span:
line_start: 9
line_stop: 9
col_start: 9
col_stop: 22
path: compiler-test
content: " return (1, 1);"
span:
line_start: 8
line_stop: 10
col_start: 13
col_stop: 6
path: compiler-test
content: " if true {\n...\n } else {"
next:
Block:
statements:
- Return:
expression:
TupleInit:
elements:
- Value:
Implicit:
- "2"
- line_start: 11
line_stop: 11
col_start: 17
col_stop: 18
path: compiler-test
content: " return (2, 2);"
- Value:
Implicit:
- "2"
- line_start: 11
line_stop: 11
col_start: 20
col_stop: 21
path: compiler-test
content: " return (2, 2);"
span:
line_start: 11
line_stop: 11
col_start: 16
col_stop: 22
path: compiler-test
content: " return (2, 2);"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 22
path: compiler-test
content: " return (2, 2);"
span:
line_start: 10
line_stop: 12
col_start: 12
col_stop: 6
path: compiler-test
content: " } else {\n...\n }"
span:
line_start: 8
line_stop: 12
col_start: 5
col_stop: 6
path: compiler-test
content: " if true {\n...\n } else {\n...\n }"
span:
line_start: 7
line_stop: 13
col_start: 3
col_stop: 2
path: compiler-test
content: ") {\n...\n}"
span:
line_start: 4
line_stop: 13
col_start: 1
col_stop: 2
path: compiler-test
content: "function tuple_conditional () -> (\n...\n) {\n...\n}\n\n\n\n"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> (u32, u32) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> (u32, u32) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> (u32, u32) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 15
line_stop: 15
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32, b: u32) -> (u32, u32) {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> (u32, u32) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 15
line_stop: 15
col_start: 23
col_stop: 24
path: compiler-test
content: "function main(a: u32, b: u32) -> (u32, u32) {"
output:
Tuple:
- IntegerType: U32
- IntegerType: U32
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a1\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a1, b1) = tuple_conditional();\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 10
col_stop: 12
path: compiler-test
content: " let (a1, b1) = tuple_conditional();"
- mutable: true
identifier: "{\"name\":\"b1\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":14,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a1, b1) = tuple_conditional();\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 14
col_stop: 16
path: compiler-test
content: " let (a1, b1) = tuple_conditional();"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"tuple_conditional\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":20,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a1, b1) = tuple_conditional();\\\"}\"}"
arguments: []
span:
line_start: 16
line_stop: 16
col_start: 20
col_stop: 39
path: compiler-test
content: " let (a1, b1) = tuple_conditional();"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 39
path: compiler-test
content: " let (a1, b1) = tuple_conditional();"
- Return:
expression:
TupleInit:
elements:
- Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a + a1, b + b1);\\\"}\"}"
right:
Identifier: "{\"name\":\"a1\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a + a1, b + b1);\\\"}\"}"
op: Add
span:
line_start: 18
line_stop: 18
col_start: 13
col_stop: 19
path: compiler-test
content: " return (a + a1, b + b1);"
- Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a + a1, b + b1);\\\"}\"}"
right:
Identifier: "{\"name\":\"b1\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":25,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a + a1, b + b1);\\\"}\"}"
op: Add
span:
line_start: 18
line_stop: 18
col_start: 21
col_stop: 27
path: compiler-test
content: " return (a + a1, b + b1);"
span:
line_start: 18
line_stop: 18
col_start: 12
col_stop: 28
path: compiler-test
content: " return (a + a1, b + b1);"
span:
line_start: 18
line_stop: 18
col_start: 5
col_stop: 28
path: compiler-test
content: " return (a + a1, b + b1);"
span:
line_start: 15
line_stop: 19
col_start: 45
col_stop: 2
path: compiler-test
content: "function main(a: u32, b: u32) -> (u32, u32) {\n...\n}"
span:
line_start: 15
line_stop: 19
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32, b: u32) -> (u32, u32) {\n...\n}\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"tuple_conditional\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuple_conditional () -> (\\\"}\"}":
annotations: []
identifier: "{\"name\":\"tuple_conditional\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function tuple_conditional () -> (\\\"}\"}"
input: []
output:
Tuple:
- IntegerType: U32
- IntegerType: U32
block:
statements:
- Conditional:
condition:
Value:
Boolean:
- "true"
- line_start: 8
line_stop: 8
col_start: 8
col_stop: 12
path: compiler-test
content: " if true {"
block:
statements:
- Return:
expression:
TupleInit:
elements:
- Value:
Integer:
- U32
- "1"
- line_start: 9
line_stop: 9
col_start: 17
col_stop: 18
path: compiler-test
content: " return (1, 1);"
- Value:
Integer:
- U32
- "1"
- line_start: 9
line_stop: 9
col_start: 20
col_stop: 21
path: compiler-test
content: " return (1, 1);"
span:
line_start: 9
line_stop: 9
col_start: 16
col_stop: 22
path: compiler-test
content: " return (1, 1);"
span:
line_start: 9
line_stop: 9
col_start: 9
col_stop: 22
path: compiler-test
content: " return (1, 1);"
span:
line_start: 8
line_stop: 10
col_start: 13
col_stop: 6
path: compiler-test
content: " if true {\n...\n } else {"
next:
Block:
statements:
- Return:
expression:
TupleInit:
elements:
- Value:
Integer:
- U32
- "2"
- line_start: 11
line_stop: 11
col_start: 17
col_stop: 18
path: compiler-test
content: " return (2, 2);"
- Value:
Integer:
- U32
- "2"
- line_start: 11
line_stop: 11
col_start: 20
col_stop: 21
path: compiler-test
content: " return (2, 2);"
span:
line_start: 11
line_stop: 11
col_start: 16
col_stop: 22
path: compiler-test
content: " return (2, 2);"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 22
path: compiler-test
content: " return (2, 2);"
span:
line_start: 10
line_stop: 12
col_start: 12
col_stop: 6
path: compiler-test
content: " } else {\n...\n }"
span:
line_start: 8
line_stop: 12
col_start: 5
col_stop: 6
path: compiler-test
content: " if true {\n...\n } else {\n...\n }"
span:
line_start: 7
line_stop: 13
col_start: 3
col_stop: 2
path: compiler-test
content: ") {\n...\n}"
span:
line_start: 4
line_stop: 13
col_start: 1
col_stop: 2
path: compiler-test
content: "function tuple_conditional () -> (\n...\n) {\n...\n}\n\n\n\n"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> (u32, u32) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> (u32, u32) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> (u32, u32) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 15
line_stop: 15
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: u32, b: u32) -> (u32, u32) {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: u32, b: u32) -> (u32, u32) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 15
line_stop: 15
col_start: 23
col_stop: 24
path: compiler-test
content: "function main(a: u32, b: u32) -> (u32, u32) {"
output:
Tuple:
- IntegerType: U32
- IntegerType: U32
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"a1\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a1, b1) = tuple_conditional();\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 10
col_stop: 12
path: compiler-test
content: " let (a1, b1) = tuple_conditional();"
- mutable: true
identifier: "{\"name\":\"b1\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":14,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a1, b1) = tuple_conditional();\\\"}\"}"
span:
line_start: 16
line_stop: 16
col_start: 14
col_stop: 16
path: compiler-test
content: " let (a1, b1) = tuple_conditional();"
type_:
Tuple:
- IntegerType: U32
- IntegerType: U32
value:
Call:
function:
Identifier: "{\"name\":\"tuple_conditional\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":20,\\\"col_stop\\\":37,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" let (a1, b1) = tuple_conditional();\\\"}\"}"
arguments: []
span:
line_start: 16
line_stop: 16
col_start: 20
col_stop: 39
path: compiler-test
content: " let (a1, b1) = tuple_conditional();"
span:
line_start: 16
line_stop: 16
col_start: 5
col_stop: 39
path: compiler-test
content: " let (a1, b1) = tuple_conditional();"
- Return:
expression:
TupleInit:
elements:
- Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a + a1, b + b1);\\\"}\"}"
right:
Identifier: "{\"name\":\"a1\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a + a1, b + b1);\\\"}\"}"
op: Add
span:
line_start: 18
line_stop: 18
col_start: 13
col_stop: 19
path: compiler-test
content: " return (a + a1, b + b1);"
- Binary:
left:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a + a1, b + b1);\\\"}\"}"
right:
Identifier: "{\"name\":\"b1\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":25,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return (a + a1, b + b1);\\\"}\"}"
op: Add
span:
line_start: 18
line_stop: 18
col_start: 21
col_stop: 27
path: compiler-test
content: " return (a + a1, b + b1);"
span:
line_start: 18
line_stop: 18
col_start: 12
col_stop: 28
path: compiler-test
content: " return (a + a1, b + b1);"
span:
line_start: 18
line_stop: 18
col_start: 5
col_stop: 28
path: compiler-test
content: " return (a + a1, b + b1);"
span:
line_start: 15
line_stop: 19
col_start: 45
col_stop: 2
path: compiler-test
content: "function main(a: u32, b: u32) -> (u32, u32) {\n...\n}"
span:
line_start: 15
line_stop: 19
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: u32, b: u32) -> (u32, u32) {\n...\n}\n\n"

View File

@ -16,3 +16,601 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"bad_mutate\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function bad_mutate(x: u32) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"bad_mutate\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function bad_mutate(x: u32) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function bad_mutate(x: u32) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 12
line_stop: 12
col_start: 21
col_stop: 22
path: compiler-test
content: "function bad_mutate(x: u32) {"
output: ~
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = 0; // <- does not change `a`\\\"}\"}"
accesses: []
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 6
path: compiler-test
content: " x = 0; // <- does not change `a`"
value:
Value:
Implicit:
- "0"
- line_start: 13
line_stop: 13
col_start: 9
col_stop: 10
path: compiler-test
content: " x = 0; // <- does not change `a`"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 10
path: compiler-test
content: " x = 0; // <- does not change `a`"
span:
line_start: 12
line_stop: 14
col_start: 29
col_stop: 2
path: compiler-test
content: "function bad_mutate(x: u32) {\n...\n}"
span:
line_start: 12
line_stop: 14
col_start: 1
col_stop: 2
path: compiler-test
content: "function bad_mutate(x: u32) {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 16
line_stop: 16
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = 1u32;\\\"}\"}"
span:
line_start: 17
line_stop: 17
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = 1u32;"
type_: ~
value:
Value:
Integer:
- U32
- "1"
- line_start: 17
line_stop: 17
col_start: 15
col_stop: 19
path: compiler-test
content: " const a = 1u32;"
span:
line_start: 17
line_stop: 17
col_start: 5
col_stop: 19
path: compiler-test
content: " const a = 1u32;"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"bad_mutate\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" bad_mutate(a);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" bad_mutate(a);\\\"}\"}"
span:
line_start: 18
line_stop: 18
col_start: 5
col_stop: 18
path: compiler-test
content: " bad_mutate(a);"
span:
line_start: 18
line_stop: 18
col_start: 5
col_stop: 18
path: compiler-test
content: " bad_mutate(a);"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 1u32 == y; // <- value `a` is still `1u32`\\\"}\"}"
right:
Value:
Integer:
- U32
- "1"
- line_start: 20
line_stop: 20
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == 1u32 == y; // <- value `a` is still `1u32`"
op: Eq
span:
line_start: 20
line_stop: 20
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == 1u32 == y; // <- value `a` is still `1u32`"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 1u32 == y; // <- value `a` is still `1u32`\\\"}\"}"
op: Eq
span:
line_start: 20
line_stop: 20
col_start: 12
col_stop: 26
path: compiler-test
content: " return a == 1u32 == y; // <- value `a` is still `1u32`"
span:
line_start: 20
line_stop: 20
col_start: 5
col_stop: 26
path: compiler-test
content: " return a == 1u32 == y; // <- value `a` is still `1u32`"
span:
line_start: 16
line_stop: 21
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 16
line_stop: 21
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"bad_mutate\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function bad_mutate(x: u32) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"bad_mutate\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function bad_mutate(x: u32) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function bad_mutate(x: u32) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 12
line_stop: 12
col_start: 21
col_stop: 22
path: compiler-test
content: "function bad_mutate(x: u32) {"
output:
Tuple: []
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = 0; // <- does not change `a`\\\"}\"}"
accesses: []
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 6
path: compiler-test
content: " x = 0; // <- does not change `a`"
value:
Value:
Implicit:
- "0"
- line_start: 13
line_stop: 13
col_start: 9
col_stop: 10
path: compiler-test
content: " x = 0; // <- does not change `a`"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 10
path: compiler-test
content: " x = 0; // <- does not change `a`"
span:
line_start: 12
line_stop: 14
col_start: 29
col_stop: 2
path: compiler-test
content: "function bad_mutate(x: u32) {\n...\n}"
span:
line_start: 12
line_stop: 14
col_start: 1
col_stop: 2
path: compiler-test
content: "function bad_mutate(x: u32) {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 16
line_stop: 16
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = 1u32;\\\"}\"}"
span:
line_start: 17
line_stop: 17
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = 1u32;"
type_: ~
value:
Value:
Integer:
- U32
- "1"
- line_start: 17
line_stop: 17
col_start: 15
col_stop: 19
path: compiler-test
content: " const a = 1u32;"
span:
line_start: 17
line_stop: 17
col_start: 5
col_stop: 19
path: compiler-test
content: " const a = 1u32;"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"bad_mutate\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" bad_mutate(a);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" bad_mutate(a);\\\"}\"}"
span:
line_start: 18
line_stop: 18
col_start: 5
col_stop: 18
path: compiler-test
content: " bad_mutate(a);"
span:
line_start: 18
line_stop: 18
col_start: 5
col_stop: 18
path: compiler-test
content: " bad_mutate(a);"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 1u32 == y; // <- value `a` is still `1u32`\\\"}\"}"
right:
Value:
Integer:
- U32
- "1"
- line_start: 20
line_stop: 20
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == 1u32 == y; // <- value `a` is still `1u32`"
op: Eq
span:
line_start: 20
line_stop: 20
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == 1u32 == y; // <- value `a` is still `1u32`"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 1u32 == y; // <- value `a` is still `1u32`\\\"}\"}"
op: Eq
span:
line_start: 20
line_stop: 20
col_start: 12
col_stop: 26
path: compiler-test
content: " return a == 1u32 == y; // <- value `a` is still `1u32`"
span:
line_start: 20
line_stop: 20
col_start: 5
col_stop: 26
path: compiler-test
content: " return a == 1u32 == y; // <- value `a` is still `1u32`"
span:
line_start: 16
line_stop: 21
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 16
line_stop: 21
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"bad_mutate\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function bad_mutate(x: u32) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"bad_mutate\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":10,\\\"col_stop\\\":20,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function bad_mutate(x: u32) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function bad_mutate(x: u32) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 12
line_stop: 12
col_start: 21
col_stop: 22
path: compiler-test
content: "function bad_mutate(x: u32) {"
output:
Tuple: []
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" x = 0; // <- does not change `a`\\\"}\"}"
accesses: []
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 6
path: compiler-test
content: " x = 0; // <- does not change `a`"
value:
Value:
Integer:
- U32
- "0"
- line_start: 13
line_stop: 13
col_start: 9
col_stop: 10
path: compiler-test
content: " x = 0; // <- does not change `a`"
span:
line_start: 13
line_stop: 13
col_start: 5
col_stop: 10
path: compiler-test
content: " x = 0; // <- does not change `a`"
span:
line_start: 12
line_stop: 14
col_start: 29
col_stop: 2
path: compiler-test
content: "function bad_mutate(x: u32) {\n...\n}"
span:
line_start: 12
line_stop: 14
col_start: 1
col_stop: 2
path: compiler-test
content: "function bad_mutate(x: u32) {\n...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 16
line_stop: 16
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(y: bool) -> bool {"
output: Boolean
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" const a = 1u32;\\\"}\"}"
span:
line_start: 17
line_stop: 17
col_start: 11
col_stop: 12
path: compiler-test
content: " const a = 1u32;"
type_:
IntegerType: U32
value:
Value:
Integer:
- U32
- "1"
- line_start: 17
line_stop: 17
col_start: 15
col_stop: 19
path: compiler-test
content: " const a = 1u32;"
span:
line_start: 17
line_stop: 17
col_start: 5
col_stop: 19
path: compiler-test
content: " const a = 1u32;"
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"bad_mutate\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" bad_mutate(a);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" bad_mutate(a);\\\"}\"}"
span:
line_start: 18
line_stop: 18
col_start: 5
col_stop: 18
path: compiler-test
content: " bad_mutate(a);"
span:
line_start: 18
line_stop: 18
col_start: 5
col_stop: 18
path: compiler-test
content: " bad_mutate(a);"
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 1u32 == y; // <- value `a` is still `1u32`\\\"}\"}"
right:
Value:
Integer:
- U32
- "1"
- line_start: 20
line_stop: 20
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == 1u32 == y; // <- value `a` is still `1u32`"
op: Eq
span:
line_start: 20
line_stop: 20
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == 1u32 == y; // <- value `a` is still `1u32`"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == 1u32 == y; // <- value `a` is still `1u32`\\\"}\"}"
op: Eq
span:
line_start: 20
line_stop: 20
col_start: 12
col_stop: 26
path: compiler-test
content: " return a == 1u32 == y; // <- value `a` is still `1u32`"
span:
line_start: 20
line_stop: 20
col_start: 5
col_stop: 26
path: compiler-test
content: " return a == 1u32 == y; // <- value `a` is still `1u32`"
span:
line_start: 16
line_stop: 21
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}"
span:
line_start: 16
line_stop: 21
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(y: bool) -> bool {\n...\n}\n\n\n"

View File

@ -16,3 +16,213 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == true;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == true;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 21
path: compiler-test
content: " return a == true;"
span:
line_start: 3
line_stop: 5
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == true;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == true;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 21
path: compiler-test
content: " return a == true;"
span:
line_start: 3
line_stop: 5
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == true;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 21
path: compiler-test
content: " return a == true;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return a == true;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 21
path: compiler-test
content: " return a == true;"
span:
line_start: 3
line_stop: 5
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"

View File

@ -16,3 +16,281 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: [i16; 1]) -> bool{\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: [i16; 1]) -> bool{\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: [i16; 1]) -> bool{\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: I16
- - value: "1"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: [i16; 1]) -> bool{"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
ArrayAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0;\\\"}\"}"
index:
Value:
Implicit:
- "0"
- line_start: 4
line_stop: 4
col_start: 14
col_stop: 15
path: compiler-test
content: " return x[0] == 0;"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 16
path: compiler-test
content: " return x[0] == 0;"
right:
Value:
Implicit:
- "0"
- line_start: 4
line_stop: 4
col_start: 20
col_stop: 21
path: compiler-test
content: " return x[0] == 0;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return x[0] == 0;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 21
path: compiler-test
content: " return x[0] == 0;"
span:
line_start: 3
line_stop: 5
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(x: [i16; 1]) -> bool{\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: [i16; 1]) -> bool{\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: [i16; 1]) -> bool{\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: [i16; 1]) -> bool{\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: [i16; 1]) -> bool{\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: I16
- - value: "1"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: [i16; 1]) -> bool{"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
ArrayAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0;\\\"}\"}"
index:
Value:
Implicit:
- "0"
- line_start: 4
line_stop: 4
col_start: 14
col_stop: 15
path: compiler-test
content: " return x[0] == 0;"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 16
path: compiler-test
content: " return x[0] == 0;"
right:
Value:
Implicit:
- "0"
- line_start: 4
line_stop: 4
col_start: 20
col_stop: 21
path: compiler-test
content: " return x[0] == 0;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return x[0] == 0;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 21
path: compiler-test
content: " return x[0] == 0;"
span:
line_start: 3
line_stop: 5
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(x: [i16; 1]) -> bool{\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: [i16; 1]) -> bool{\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: [i16; 1]) -> bool{\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: [i16; 1]) -> bool{\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: [i16; 1]) -> bool{\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: I16
- - value: "1"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: [i16; 1]) -> bool{"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
ArrayAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x[0] == 0;\\\"}\"}"
index:
Value:
Integer:
- U32
- "0"
- line_start: 4
line_stop: 4
col_start: 14
col_stop: 15
path: compiler-test
content: " return x[0] == 0;"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 16
path: compiler-test
content: " return x[0] == 0;"
right:
Value:
Integer:
- I16
- "0"
- line_start: 4
line_stop: 4
col_start: 20
col_stop: 21
path: compiler-test
content: " return x[0] == 0;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return x[0] == 0;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 21
path: compiler-test
content: " return x[0] == 0;"
span:
line_start: 3
line_stop: 5
col_start: 35
col_stop: 2
path: compiler-test
content: "function main(x: [i16; 1]) -> bool{\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: [i16; 1]) -> bool{\n...\n}"

View File

@ -16,3 +16,351 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: char, y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: char, y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: char, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Char
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: char, y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: char, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: char, y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == '👍';\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true && a == '👍';"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true && a == '👍';"
right:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == '👍';\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 128077
span:
line_start: 4
line_stop: 4
col_start: 30
col_stop: 36
path: compiler-test
content: " return y == true && a == '👍';"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 36
path: compiler-test
content: " return y == true && a == '👍';"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 36
path: compiler-test
content: " return y == true && a == '👍';"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 36
path: compiler-test
content: " return y == true && a == '👍';"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: char, y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: char, y: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: char, y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: char, y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: char, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Char
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: char, y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: char, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: char, y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == '👍';\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true && a == '👍';"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true && a == '👍';"
right:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == '👍';\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 128077
span:
line_start: 4
line_stop: 4
col_start: 30
col_stop: 36
path: compiler-test
content: " return y == true && a == '👍';"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 36
path: compiler-test
content: " return y == true && a == '👍';"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 36
path: compiler-test
content: " return y == true && a == '👍';"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 36
path: compiler-test
content: " return y == true && a == '👍';"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: char, y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: char, y: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: char, y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: char, y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: char, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Char
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: char, y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: char, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: char, y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == '👍';\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true && a == '👍';"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true && a == '👍';"
right:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == '👍';\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 128077
span:
line_start: 4
line_stop: 4
col_start: 30
col_stop: 36
path: compiler-test
content: " return y == true && a == '👍';"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 36
path: compiler-test
content: " return y == true && a == '👍';"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 36
path: compiler-test
content: " return y == true && a == '👍';"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 36
path: compiler-test
content: " return y == true && a == '👍';"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: char, y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: char, y: bool) -> bool {\n...\n}"

View File

@ -16,3 +16,357 @@ outputs:
r0:
type: bool
value: "false"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == b;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true && a == b;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true && a == b;"
right:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == b;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 31
path: compiler-test
content: " return y == true && a == b;"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 31
path: compiler-test
content: " return y == true && a == b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 31
path: compiler-test
content: " return y == true && a == b;"
span:
line_start: 3
line_stop: 5
col_start: 52
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == b;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true && a == b;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true && a == b;"
right:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == b;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 31
path: compiler-test
content: " return y == true && a == b;"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 31
path: compiler-test
content: " return y == true && a == b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 31
path: compiler-test
content: " return y == true && a == b;"
span:
line_start: 3
line_stop: 5
col_start: 52
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Field
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: field, b: field, y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == b;\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true && a == b;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true && a == b;"
right:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":30,\\\"col_stop\\\":31,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == b;\\\"}\"}"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 31
path: compiler-test
content: " return y == true && a == b;"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 31
path: compiler-test
content: " return y == true && a == b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 31
path: compiler-test
content: " return y == true && a == b;"
span:
line_start: 3
line_stop: 5
col_start: 52
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: field, b: field, y: bool) -> bool {\n...\n}"

View File

@ -13,3 +13,395 @@ outputs:
- input_file: input/main_group.in
output:
registers: {}
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}"
const_: false
mutable: true
type_: Group
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: group, b: group, c: group) {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}"
const_: false
mutable: true
type_: Group
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: group, b: group, c: group) {"
- Variable:
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}"
const_: false
mutable: true
type_: Group
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: group, b: group, c: group) {"
output: ~
block:
statements:
- Console:
function:
Log:
parts:
- Const: "a: "
- Container
parameters:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"a: {}\\\\\\\", a);\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 17
col_stop: 27
path: compiler-test
content: " console.log(\"a: {}\", a);"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 27
path: compiler-test
content: " console.log(\"a: {}\", a);"
- Console:
function:
Log:
parts:
- Const: "b: "
- Container
parameters:
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"b: {}\\\\\\\", b);\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 17
col_stop: 27
path: compiler-test
content: " console.log(\"b: {}\", b);"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 27
path: compiler-test
content: " console.log(\"b: {}\", b);"
- Console:
function:
Log:
parts:
- Const: "c: "
- Container
parameters:
- Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"c: {}\\\\\\\", c);\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 17
col_stop: 27
path: compiler-test
content: " console.log(\"c: {}\", c);"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 27
path: compiler-test
content: " console.log(\"c: {}\", c);"
span:
line_start: 3
line_stop: 8
col_start: 45
col_stop: 2
path: compiler-test
content: "function main(a: group, b: group, c: group) {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: group, b: group, c: group) {\n...\n}\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}"
const_: false
mutable: true
type_: Group
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: group, b: group, c: group) {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}"
const_: false
mutable: true
type_: Group
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: group, b: group, c: group) {"
- Variable:
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}"
const_: false
mutable: true
type_: Group
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: group, b: group, c: group) {"
output:
Tuple: []
block:
statements:
- Console:
function:
Log:
parts:
- Const: "a: "
- Container
parameters:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"a: {}\\\\\\\", a);\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 17
col_stop: 27
path: compiler-test
content: " console.log(\"a: {}\", a);"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 27
path: compiler-test
content: " console.log(\"a: {}\", a);"
- Console:
function:
Log:
parts:
- Const: "b: "
- Container
parameters:
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"b: {}\\\\\\\", b);\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 17
col_stop: 27
path: compiler-test
content: " console.log(\"b: {}\", b);"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 27
path: compiler-test
content: " console.log(\"b: {}\", b);"
- Console:
function:
Log:
parts:
- Const: "c: "
- Container
parameters:
- Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"c: {}\\\\\\\", c);\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 17
col_stop: 27
path: compiler-test
content: " console.log(\"c: {}\", c);"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 27
path: compiler-test
content: " console.log(\"c: {}\", c);"
span:
line_start: 3
line_stop: 8
col_start: 45
col_stop: 2
path: compiler-test
content: "function main(a: group, b: group, c: group) {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: group, b: group, c: group) {\n...\n}\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}"
const_: false
mutable: true
type_: Group
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: group, b: group, c: group) {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}"
const_: false
mutable: true
type_: Group
span:
line_start: 3
line_stop: 3
col_start: 25
col_stop: 26
path: compiler-test
content: "function main(a: group, b: group, c: group) {"
- Variable:
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: group, b: group, c: group) {\\\"}\"}"
const_: false
mutable: true
type_: Group
span:
line_start: 3
line_stop: 3
col_start: 35
col_stop: 36
path: compiler-test
content: "function main(a: group, b: group, c: group) {"
output:
Tuple: []
block:
statements:
- Console:
function:
Log:
parts:
- Const: "a: "
- Container
parameters:
- Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"a: {}\\\\\\\", a);\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 17
col_stop: 27
path: compiler-test
content: " console.log(\"a: {}\", a);"
span:
line_start: 5
line_stop: 5
col_start: 5
col_stop: 27
path: compiler-test
content: " console.log(\"a: {}\", a);"
- Console:
function:
Log:
parts:
- Const: "b: "
- Container
parameters:
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"b: {}\\\\\\\", b);\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 17
col_stop: 27
path: compiler-test
content: " console.log(\"b: {}\", b);"
span:
line_start: 6
line_stop: 6
col_start: 5
col_stop: 27
path: compiler-test
content: " console.log(\"b: {}\", b);"
- Console:
function:
Log:
parts:
- Const: "c: "
- Container
parameters:
- Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"c: {}\\\\\\\", c);\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 17
col_stop: 27
path: compiler-test
content: " console.log(\"c: {}\", c);"
span:
line_start: 7
line_stop: 7
col_start: 5
col_stop: 27
path: compiler-test
content: " console.log(\"c: {}\", c);"
span:
line_start: 3
line_stop: 8
col_start: 45
col_stop: 2
path: compiler-test
content: "function main(a: group, b: group, c: group) {\n...\n}"
span:
line_start: 3
line_stop: 8
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: group, b: group, c: group) {\n...\n}\n\n\n"

View File

@ -16,3 +16,225 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b;\\\"}\"}"
op: Ne
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a != b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a != b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b;\\\"}\"}"
op: Ne
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a != b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a != b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool, b: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 24
col_stop: 25
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b;\\\"}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a != b;\\\"}\"}"
op: Ne
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: compiler-test
content: " return a != b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 18
path: compiler-test
content: " return a != b;"
span:
line_start: 3
line_stop: 5
col_start: 41
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool, b: bool) -> bool {\n...\n}"

View File

@ -16,3 +16,478 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [char; 5], y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [char; 5], y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [char; 5], y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Char
- - value: "5"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [char; 5], y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [char; 5], y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 29
col_stop: 30
path: compiler-test
content: "function main(a: [char; 5], y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == \\\\\\\"😭😂👍😁😘\\\\\\\";\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
right:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == \\\\\\\"😭😂👍😁😘\\\\\\\";\\\"}\"}"
right:
Value:
String:
- - Scalar: 128557
- Scalar: 128514
- Scalar: 128077
- Scalar: 128513
- Scalar: 128536
- line_start: 4
line_stop: 4
col_start: 30
col_stop: 52
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 52
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 52
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 52
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
span:
line_start: 3
line_stop: 5
col_start: 46
col_stop: 2
path: compiler-test
content: "function main(a: [char; 5], y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [char; 5], y: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [char; 5], y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [char; 5], y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [char; 5], y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Char
- - value: "5"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [char; 5], y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [char; 5], y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 29
col_stop: 30
path: compiler-test
content: "function main(a: [char; 5], y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == \\\\\\\"😭😂👍😁😘\\\\\\\";\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
right:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == \\\\\\\"😭😂👍😁😘\\\\\\\";\\\"}\"}"
right:
ArrayInline:
elements:
- Expression:
Value:
Char:
character:
Scalar: 128557
span:
line_start: 4
line_stop: 4
col_start: 31
col_stop: 32
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
- Expression:
Value:
Char:
character:
Scalar: 128514
span:
line_start: 4
line_stop: 4
col_start: 32
col_stop: 33
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
- Expression:
Value:
Char:
character:
Scalar: 128077
span:
line_start: 4
line_stop: 4
col_start: 33
col_stop: 34
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
- Expression:
Value:
Char:
character:
Scalar: 128513
span:
line_start: 4
line_stop: 4
col_start: 34
col_stop: 35
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
- Expression:
Value:
Char:
character:
Scalar: 128536
span:
line_start: 4
line_stop: 4
col_start: 35
col_stop: 36
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
span:
line_start: 4
line_stop: 4
col_start: 30
col_stop: 52
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 52
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 52
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 52
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
span:
line_start: 3
line_stop: 5
col_start: 46
col_stop: 2
path: compiler-test
content: "function main(a: [char; 5], y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [char; 5], y: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [char; 5], y: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [char; 5], y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [char; 5], y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Char
- - value: "5"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: [char; 5], y: bool) -> bool {"
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":29,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: [char; 5], y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 29
col_stop: 30
path: compiler-test
content: "function main(a: [char; 5], y: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == \\\\\\\"😭😂👍😁😘\\\\\\\";\\\"}\"}"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 17
col_stop: 21
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
right:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return y == true && a == \\\\\\\"😭😂👍😁😘\\\\\\\";\\\"}\"}"
right:
ArrayInline:
elements:
- Expression:
Value:
Char:
character:
Scalar: 128557
span:
line_start: 4
line_stop: 4
col_start: 31
col_stop: 32
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
- Expression:
Value:
Char:
character:
Scalar: 128514
span:
line_start: 4
line_stop: 4
col_start: 32
col_stop: 33
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
- Expression:
Value:
Char:
character:
Scalar: 128077
span:
line_start: 4
line_stop: 4
col_start: 33
col_stop: 34
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
- Expression:
Value:
Char:
character:
Scalar: 128513
span:
line_start: 4
line_stop: 4
col_start: 34
col_stop: 35
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
- Expression:
Value:
Char:
character:
Scalar: 128536
span:
line_start: 4
line_stop: 4
col_start: 35
col_stop: 36
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
span:
line_start: 4
line_stop: 4
col_start: 30
col_stop: 52
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 52
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 52
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 52
path: compiler-test
content: " return y == true && a == \"😭😂👍😁😘\";"
span:
line_start: 3
line_stop: 5
col_start: 46
col_stop: 2
path: compiler-test
content: "function main(a: [char; 5], y: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: [char; 5], y: bool) -> bool {\n...\n}"

View File

@ -16,3 +16,518 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: (u8, bool, u8)) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: (u8, bool, u8)) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: (u8, bool, u8)) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Tuple:
- IntegerType: U8
- Boolean
- IntegerType: U8
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: (u8, bool, u8)) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Binary:
left:
TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x.0 == 10 && x.1 == true && x.2 == 10;\\\"}\"}"
index:
value: "0"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 15
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Value:
Implicit:
- "10"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 21
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Binary:
left:
TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x.0 == 10 && x.1 == true && x.2 == 10;\\\"}\"}"
index:
value: "1"
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 28
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 32
col_stop: 36
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 36
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 36
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Binary:
left:
TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x.0 == 10 && x.1 == true && x.2 == 10;\\\"}\"}"
index:
value: "2"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 43
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Value:
Implicit:
- "10"
- line_start: 4
line_stop: 4
col_start: 47
col_stop: 49
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 49
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 49
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 49
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
span:
line_start: 3
line_stop: 5
col_start: 42
col_stop: 2
path: compiler-test
content: "function main(x: (u8, bool, u8)) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: (u8, bool, u8)) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: (u8, bool, u8)) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: (u8, bool, u8)) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: (u8, bool, u8)) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Tuple:
- IntegerType: U8
- Boolean
- IntegerType: U8
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: (u8, bool, u8)) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Binary:
left:
TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x.0 == 10 && x.1 == true && x.2 == 10;\\\"}\"}"
index:
value: "0"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 15
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Value:
Implicit:
- "10"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 21
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Binary:
left:
TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x.0 == 10 && x.1 == true && x.2 == 10;\\\"}\"}"
index:
value: "1"
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 28
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 32
col_stop: 36
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 36
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 36
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Binary:
left:
TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x.0 == 10 && x.1 == true && x.2 == 10;\\\"}\"}"
index:
value: "2"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 43
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Value:
Implicit:
- "10"
- line_start: 4
line_stop: 4
col_start: 47
col_stop: 49
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 49
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 49
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 49
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
span:
line_start: 3
line_stop: 5
col_start: 42
col_stop: 2
path: compiler-test
content: "function main(x: (u8, bool, u8)) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: (u8, bool, u8)) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: (u8, bool, u8)) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: (u8, bool, u8)) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(x: (u8, bool, u8)) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Tuple:
- IntegerType: U8
- Boolean
- IntegerType: U8
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(x: (u8, bool, u8)) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Binary:
left:
TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x.0 == 10 && x.1 == true && x.2 == 10;\\\"}\"}"
index:
value: "0"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 15
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Value:
Integer:
- U8
- "10"
- line_start: 4
line_stop: 4
col_start: 19
col_stop: 21
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 21
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Binary:
left:
TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":25,\\\"col_stop\\\":26,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x.0 == 10 && x.1 == true && x.2 == 10;\\\"}\"}"
index:
value: "1"
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 28
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Value:
Boolean:
- "true"
- line_start: 4
line_stop: 4
col_start: 32
col_stop: 36
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 25
col_stop: 36
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 36
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Binary:
left:
TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return x.0 == 10 && x.1 == true && x.2 == 10;\\\"}\"}"
index:
value: "2"
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 43
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
right:
Value:
Integer:
- U8
- "10"
- line_start: 4
line_stop: 4
col_start: 47
col_stop: 49
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 40
col_stop: 49
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
op: And
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 49
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 49
path: compiler-test
content: " return x.0 == 10 && x.1 == true && x.2 == 10;"
span:
line_start: 3
line_stop: 5
col_start: 42
col_stop: 2
path: compiler-test
content: "function main(x: (u8, bool, u8)) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(x: (u8, bool, u8)) -> bool {\n...\n}"

View File

@ -16,3 +16,249 @@ outputs:
b:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == input.registers.b;\\\"}\"}"
right:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == input.registers.b;\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":23,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == input.registers.b;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 32
path: compiler-test
content: " return a == input.registers.b;"
name: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == input.registers.b;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 34
path: compiler-test
content: " return a == input.registers.b;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 34
path: compiler-test
content: " return a == input.registers.b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 34
path: compiler-test
content: " return a == input.registers.b;"
span:
line_start: 3
line_stop: 5
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == input.registers.b;\\\"}\"}"
right:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == input.registers.b;\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":23,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == input.registers.b;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 32
path: compiler-test
content: " return a == input.registers.b;"
name: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == input.registers.b;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 34
path: compiler-test
content: " return a == input.registers.b;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 34
path: compiler-test
content: " return a == input.registers.b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 34
path: compiler-test
content: " return a == input.registers.b;"
span:
line_start: 3
line_stop: 5
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(a: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 16
path: compiler-test
content: "function main(a: bool) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == input.registers.b;\\\"}\"}"
right:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == input.registers.b;\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":23,\\\"col_stop\\\":32,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == input.registers.b;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 32
path: compiler-test
content: " return a == input.registers.b;"
name: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":33,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return a == input.registers.b;\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 17
col_stop: 34
path: compiler-test
content: " return a == input.registers.b;"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 34
path: compiler-test
content: " return a == input.registers.b;"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 34
path: compiler-test
content: " return a == input.registers.b;"
span:
line_start: 3
line_stop: 5
col_start: 32
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 5
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(a: bool) -> bool {\n...\n}"

View File

@ -16,3 +16,894 @@ outputs:
r0:
type: bool
value: "true"
initial_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(data: [u8; 32]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(data: [u8; 32]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"data\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(data: [u8; 32]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "32"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 19
path: compiler-test
content: "function main(data: [u8; 32]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Binary:
left:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.value_balance == 0u64\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.value_balance == 0u64\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 27
path: compiler-test
content: " return input.registers.value_balance == 0u64"
name: "{\"name\":\"value_balance\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":28,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.value_balance == 0u64\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 41
path: compiler-test
content: " return input.registers.value_balance == 0u64"
right:
Value:
Integer:
- U64
- "0"
- line_start: 4
line_stop: 4
col_start: 45
col_stop: 49
path: compiler-test
content: " return input.registers.value_balance == 0u64"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 49
path: compiler-test
content: " return input.registers.value_balance == 0u64"
right:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state.leaf_index == 0u32\\\"}\"}"
name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state.leaf_index == 0u32\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 23
path: compiler-test
content: " && input.state.leaf_index == 0u32"
name: "{\"name\":\"leaf_index\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":24,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state.leaf_index == 0u32\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 34
path: compiler-test
content: " && input.state.leaf_index == 0u32"
right:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 38
col_stop: 42
path: compiler-test
content: " && input.state.leaf_index == 0u32"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 42
path: compiler-test
content: " && input.state.leaf_index == 0u32"
op: And
span:
line_start: 4
line_stop: 5
col_start: 12
col_stop: 42
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32"
right:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.record.value == 5u64\\\"}\"}"
name: "{\"name\":\"record\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.record.value == 5u64\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 24
path: compiler-test
content: " && input.record.value == 5u64"
name: "{\"name\":\"value\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":25,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.record.value == 5u64\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 30
path: compiler-test
content: " && input.record.value == 5u64"
right:
Value:
Integer:
- U64
- "5"
- line_start: 6
line_stop: 6
col_start: 34
col_stop: 38
path: compiler-test
content: " && input.record.value == 5u64"
op: Eq
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 38
path: compiler-test
content: " && input.record.value == 5u64"
op: And
span:
line_start: 4
line_stop: 6
col_start: 12
col_stop: 38
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32\n && input.record.value == 5u64"
right:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state_leaf.network_id == 0u8\\\"}\"}"
name: "{\"name\":\"state_leaf\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state_leaf.network_id == 0u8\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 28
path: compiler-test
content: " && input.state_leaf.network_id == 0u8"
name: "{\"name\":\"network_id\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":29,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state_leaf.network_id == 0u8\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 39
path: compiler-test
content: " && input.state_leaf.network_id == 0u8"
right:
Value:
Integer:
- U8
- "0"
- line_start: 7
line_stop: 7
col_start: 43
col_stop: 46
path: compiler-test
content: " && input.state_leaf.network_id == 0u8"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 46
path: compiler-test
content: " && input.state_leaf.network_id == 0u8"
op: And
span:
line_start: 4
line_stop: 7
col_start: 12
col_stop: 46
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32\n && input.record.value == 5u64\n && input.state_leaf.network_id == 0u8"
right:
Binary:
left:
Identifier: "{\"name\":\"data\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && data == [0u8; 32];\\\"}\"}"
right:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 8
line_stop: 8
col_start: 21
col_stop: 24
path: compiler-test
content: " && data == [0u8; 32];"
dimensions:
- value: "32"
span:
line_start: 8
line_stop: 8
col_start: 20
col_stop: 29
path: compiler-test
content: " && data == [0u8; 32];"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 29
path: compiler-test
content: " && data == [0u8; 32];"
op: And
span:
line_start: 4
line_stop: 8
col_start: 12
col_stop: 29
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32\n && input.record.value == 5u64\n && input.state_leaf.network_id == 0u8\n && data == [0u8; 32];"
span:
line_start: 4
line_stop: 8
col_start: 5
col_stop: 29
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32\n && input.record.value == 5u64\n && input.state_leaf.network_id == 0u8\n && data == [0u8; 32];"
span:
line_start: 3
line_stop: 9
col_start: 39
col_stop: 2
path: compiler-test
content: "function main(data: [u8; 32]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(data: [u8; 32]) -> bool {\n...\n}\n\n\n\n"
canonicalized_theorem:
name: ""
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(data: [u8; 32]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(data: [u8; 32]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"data\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(data: [u8; 32]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "32"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 19
path: compiler-test
content: "function main(data: [u8; 32]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Binary:
left:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.value_balance == 0u64\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.value_balance == 0u64\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 27
path: compiler-test
content: " return input.registers.value_balance == 0u64"
name: "{\"name\":\"value_balance\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":28,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.value_balance == 0u64\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 41
path: compiler-test
content: " return input.registers.value_balance == 0u64"
right:
Value:
Integer:
- U64
- "0"
- line_start: 4
line_stop: 4
col_start: 45
col_stop: 49
path: compiler-test
content: " return input.registers.value_balance == 0u64"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 49
path: compiler-test
content: " return input.registers.value_balance == 0u64"
right:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state.leaf_index == 0u32\\\"}\"}"
name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state.leaf_index == 0u32\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 23
path: compiler-test
content: " && input.state.leaf_index == 0u32"
name: "{\"name\":\"leaf_index\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":24,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state.leaf_index == 0u32\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 34
path: compiler-test
content: " && input.state.leaf_index == 0u32"
right:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 38
col_stop: 42
path: compiler-test
content: " && input.state.leaf_index == 0u32"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 42
path: compiler-test
content: " && input.state.leaf_index == 0u32"
op: And
span:
line_start: 4
line_stop: 5
col_start: 12
col_stop: 42
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32"
right:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.record.value == 5u64\\\"}\"}"
name: "{\"name\":\"record\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.record.value == 5u64\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 24
path: compiler-test
content: " && input.record.value == 5u64"
name: "{\"name\":\"value\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":25,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.record.value == 5u64\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 30
path: compiler-test
content: " && input.record.value == 5u64"
right:
Value:
Integer:
- U64
- "5"
- line_start: 6
line_stop: 6
col_start: 34
col_stop: 38
path: compiler-test
content: " && input.record.value == 5u64"
op: Eq
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 38
path: compiler-test
content: " && input.record.value == 5u64"
op: And
span:
line_start: 4
line_stop: 6
col_start: 12
col_stop: 38
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32\n && input.record.value == 5u64"
right:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state_leaf.network_id == 0u8\\\"}\"}"
name: "{\"name\":\"state_leaf\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state_leaf.network_id == 0u8\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 28
path: compiler-test
content: " && input.state_leaf.network_id == 0u8"
name: "{\"name\":\"network_id\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":29,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state_leaf.network_id == 0u8\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 39
path: compiler-test
content: " && input.state_leaf.network_id == 0u8"
right:
Value:
Integer:
- U8
- "0"
- line_start: 7
line_stop: 7
col_start: 43
col_stop: 46
path: compiler-test
content: " && input.state_leaf.network_id == 0u8"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 46
path: compiler-test
content: " && input.state_leaf.network_id == 0u8"
op: And
span:
line_start: 4
line_stop: 7
col_start: 12
col_stop: 46
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32\n && input.record.value == 5u64\n && input.state_leaf.network_id == 0u8"
right:
Binary:
left:
Identifier: "{\"name\":\"data\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && data == [0u8; 32];\\\"}\"}"
right:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 8
line_stop: 8
col_start: 21
col_stop: 24
path: compiler-test
content: " && data == [0u8; 32];"
dimensions:
- value: "32"
span:
line_start: 8
line_stop: 8
col_start: 20
col_stop: 29
path: compiler-test
content: " && data == [0u8; 32];"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 29
path: compiler-test
content: " && data == [0u8; 32];"
op: And
span:
line_start: 4
line_stop: 8
col_start: 12
col_stop: 29
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32\n && input.record.value == 5u64\n && input.state_leaf.network_id == 0u8\n && data == [0u8; 32];"
span:
line_start: 4
line_stop: 8
col_start: 5
col_stop: 29
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32\n && input.record.value == 5u64\n && input.state_leaf.network_id == 0u8\n && data == [0u8; 32];"
span:
line_start: 3
line_stop: 9
col_start: 39
col_stop: 2
path: compiler-test
content: "function main(data: [u8; 32]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(data: [u8; 32]) -> bool {\n...\n}\n\n\n\n"
type_inferenced_theorem:
name: test
expected_input: []
imports: []
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(data: [u8; 32]) -> bool {\\\"}\"}":
annotations: []
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(data: [u8; 32]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"data\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":19,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\"function main(data: [u8; 32]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "32"
span:
line_start: 3
line_stop: 3
col_start: 15
col_stop: 19
path: compiler-test
content: "function main(data: [u8; 32]) -> bool {"
output: Boolean
block:
statements:
- Return:
expression:
Binary:
left:
Binary:
left:
Binary:
left:
Binary:
left:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.value_balance == 0u64\\\"}\"}"
name: "{\"name\":\"registers\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":27,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.value_balance == 0u64\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 27
path: compiler-test
content: " return input.registers.value_balance == 0u64"
name: "{\"name\":\"value_balance\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":28,\\\"col_stop\\\":41,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" return input.registers.value_balance == 0u64\\\"}\"}"
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 41
path: compiler-test
content: " return input.registers.value_balance == 0u64"
right:
Value:
Integer:
- U64
- "0"
- line_start: 4
line_stop: 4
col_start: 45
col_stop: 49
path: compiler-test
content: " return input.registers.value_balance == 0u64"
op: Eq
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 49
path: compiler-test
content: " return input.registers.value_balance == 0u64"
right:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state.leaf_index == 0u32\\\"}\"}"
name: "{\"name\":\"state\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":18,\\\"col_stop\\\":23,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state.leaf_index == 0u32\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 23
path: compiler-test
content: " && input.state.leaf_index == 0u32"
name: "{\"name\":\"leaf_index\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":24,\\\"col_stop\\\":34,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state.leaf_index == 0u32\\\"}\"}"
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 34
path: compiler-test
content: " && input.state.leaf_index == 0u32"
right:
Value:
Integer:
- U32
- "0"
- line_start: 5
line_stop: 5
col_start: 38
col_stop: 42
path: compiler-test
content: " && input.state.leaf_index == 0u32"
op: Eq
span:
line_start: 5
line_stop: 5
col_start: 12
col_stop: 42
path: compiler-test
content: " && input.state.leaf_index == 0u32"
op: And
span:
line_start: 4
line_stop: 5
col_start: 12
col_stop: 42
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32"
right:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.record.value == 5u64\\\"}\"}"
name: "{\"name\":\"record\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":18,\\\"col_stop\\\":24,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.record.value == 5u64\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 24
path: compiler-test
content: " && input.record.value == 5u64"
name: "{\"name\":\"value\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":25,\\\"col_stop\\\":30,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.record.value == 5u64\\\"}\"}"
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 30
path: compiler-test
content: " && input.record.value == 5u64"
right:
Value:
Integer:
- U64
- "5"
- line_start: 6
line_stop: 6
col_start: 34
col_stop: 38
path: compiler-test
content: " && input.record.value == 5u64"
op: Eq
span:
line_start: 6
line_stop: 6
col_start: 12
col_stop: 38
path: compiler-test
content: " && input.record.value == 5u64"
op: And
span:
line_start: 4
line_stop: 6
col_start: 12
col_stop: 38
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32\n && input.record.value == 5u64"
right:
Binary:
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":17,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state_leaf.network_id == 0u8\\\"}\"}"
name: "{\"name\":\"state_leaf\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":28,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state_leaf.network_id == 0u8\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 28
path: compiler-test
content: " && input.state_leaf.network_id == 0u8"
name: "{\"name\":\"network_id\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":29,\\\"col_stop\\\":39,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && input.state_leaf.network_id == 0u8\\\"}\"}"
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 39
path: compiler-test
content: " && input.state_leaf.network_id == 0u8"
right:
Value:
Integer:
- U8
- "0"
- line_start: 7
line_stop: 7
col_start: 43
col_stop: 46
path: compiler-test
content: " && input.state_leaf.network_id == 0u8"
op: Eq
span:
line_start: 7
line_stop: 7
col_start: 12
col_stop: 46
path: compiler-test
content: " && input.state_leaf.network_id == 0u8"
op: And
span:
line_start: 4
line_stop: 7
col_start: 12
col_stop: 46
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32\n && input.record.value == 5u64\n && input.state_leaf.network_id == 0u8"
right:
Binary:
left:
Identifier: "{\"name\":\"data\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":12,\\\"col_stop\\\":16,\\\"path\\\":\\\"compiler-test\\\",\\\"content\\\":\\\" && data == [0u8; 32];\\\"}\"}"
right:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- line_start: 8
line_stop: 8
col_start: 21
col_stop: 24
path: compiler-test
content: " && data == [0u8; 32];"
dimensions:
- value: "32"
span:
line_start: 8
line_stop: 8
col_start: 20
col_stop: 29
path: compiler-test
content: " && data == [0u8; 32];"
op: Eq
span:
line_start: 8
line_stop: 8
col_start: 12
col_stop: 29
path: compiler-test
content: " && data == [0u8; 32];"
op: And
span:
line_start: 4
line_stop: 8
col_start: 12
col_stop: 29
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32\n && input.record.value == 5u64\n && input.state_leaf.network_id == 0u8\n && data == [0u8; 32];"
span:
line_start: 4
line_stop: 8
col_start: 5
col_stop: 29
path: compiler-test
content: " return input.registers.value_balance == 0u64\n && input.state.leaf_index == 0u32\n && input.record.value == 5u64\n && input.state_leaf.network_id == 0u8\n && data == [0u8; 32];"
span:
line_start: 3
line_stop: 9
col_start: 39
col_stop: 2
path: compiler-test
content: "function main(data: [u8; 32]) -> bool {\n...\n}"
span:
line_start: 3
line_stop: 9
col_start: 1
col_stop: 2
path: compiler-test
content: "function main(data: [u8; 32]) -> bool {\n...\n}\n\n\n\n"

Some files were not shown because too many files have changed in this diff Show More